Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
Hello all, I am currently looking for a solution similar to Oracle Listener. Current situation: I have a system with multiple PostgreSQL clusters for different databases. Each cluster is running on the same physical machine and is accessed through its own DNS alias and corresponding port. I

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Dominique Devienne
On Fri, Jun 16, 2023 at 2:50 PM Laurenz Albe wrote: > There is an existing solution for that: the libpq connection service file: > https://www.postgresql.org/docs/current/libpq-pgservice.html The problem with the service and password files is that passwords are in plain text though. Yes there

Re: Using vars in jsonbpath operator ?

2023-06-16 Thread Thomas Kellerer
Markur Sens schrieb am 16.06.2023 um 13:54: > I understand that on a where clause a gin index can be used for the following > predicate > > a.data @? '$.results.docs[*].accs[*] ? (@.id == “123") > > I have a join query however on the following condition > > jsonb_path_exists(a.data,

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 14:13, "Laurenz Albe" schrieb: > On Fri, 2023-06-16 at 09:40 +, Brainmue wrote: > >> I am currently looking for a solution similar to Oracle Listener. > > Can you explain why? Perhaps there exists a good solution for the > underlying problem. > > Yours, > Laurenz Albe

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Ron
On 6/16/23 07:50, Laurenz Albe wrote: On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: We want to minimise dependencies between the application and the associated PostgreSQL DB. The idea is that the application gets its DB alias and this is then used as a connection string. This way we can

Using vars in jsonbpath operator ?

2023-06-16 Thread Markur Sens
I understand that on a where clause a gin index can be used for the following predicate a.data @? '$.results.docs[*].accs[*] ? (@.id == “123") I have a join query however on the following condition jsonb_path_exists(a.data, '$.results.docs[*].accs[*] ? (@.number == $id)',

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Thomas Markus
Hi Am 16.06.23 um 11:40 schrieb Brainmue: Hello all, I am currently looking for a solution similar to Oracle Listener. Current situation: I have a system with multiple PostgreSQL clusters for different databases. Each cluster is running on the same physical machine and is accessed through

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 12:04, "Thomas Markus" schrieb: > Hi > > Am 16.06.23 um 11:40 schrieb Brainmue: > >> Hello all, >> >> I am currently looking for a solution similar to Oracle Listener. >> >> Current situation: >> I have a system with multiple PostgreSQL clusters for different databases. >> Each

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Laurenz Albe
On Fri, 2023-06-16 at 09:40 +, Brainmue wrote: > I am currently looking for a solution similar to Oracle Listener. Can you explain why? Perhaps there exists a good solution for the underlying problem. Yours, Laurenz Albe

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Laurenz Albe
On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: > We want to minimise dependencies between the application and the associated > PostgreSQL DB. > The idea is that the application gets its DB alias and this is then used as a > connection string. > This way we can decide in the backend on which

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Ron
On 6/16/23 10:54, Brainmue wrote: 16. Juni 2023 17:41, "Ron" schrieb: On 6/16/23 10:18, Laurenz Albe wrote: On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: 16. Juni 2023 14:50, "Laurenz Albe" schrieb: On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: We want to minimise dependencies

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 14:50, "Laurenz Albe" schrieb: > On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: > >> We want to minimise dependencies between the application and the associated >> PostgreSQL DB. >> The idea is that the application gets its DB alias and this is then used as >> a connection

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 18:56, "Ron" schrieb: > On 6/16/23 11:05, Brainmue wrote: > >> 16. Juni 2023 17:59, "Ron" schrieb: > > [snip] > >> There's always The Cloud... spinning up a new AWS RDS Postgresql is fast and >> simple. (Costly, >> though.) >> >> We know that too, but our data should/must

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Laurenz Albe
On Fri, 2023-06-16 at 09:04 -0500, Ron wrote: > On 6/16/23 07:50, Laurenz Albe wrote: > > On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: > > > We want to minimise dependencies between the application and the > > > associated PostgreSQL DB. > > > The idea is that the application gets its DB

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Laurenz Albe
On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: > 16. Juni 2023 14:50, "Laurenz Albe" schrieb: > > > On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: > > > > > We want to minimise dependencies between the application and the > > > associated PostgreSQL DB. > > > The idea is that the

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 17:18, "Laurenz Albe" schrieb: > On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: > >> 16. Juni 2023 14:50, "Laurenz Albe" schrieb: >> >> On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: >> >>> We want to minimise dependencies between the application and the associated >>>

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Ron
On 6/16/23 10:18, Laurenz Albe wrote: On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: 16. Juni 2023 14:50, "Laurenz Albe" schrieb: On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: We want to minimise dependencies between the application and the associated PostgreSQL DB. The idea is

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Jeff Ross
We have already looked at pgbouncer and it works with that but unfortunately you have to do the authentication in pgbouncer. Which we don't like so much. Regards, Michael You can set up pgbouncer to authenticate in postgres:

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Laurenz Albe
On Fri, 2023-06-16 at 15:25 +0200, Dominique Devienne wrote: > On Fri, Jun 16, 2023 at 2:50 PM Laurenz Albe wrote: > > There is an existing solution for that: the libpq connection service file: > > https://www.postgresql.org/docs/current/libpq-pgservice.html > > The problem with the service and

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Ron
On 6/16/23 10:19, Laurenz Albe wrote: On Fri, 2023-06-16 at 09:04 -0500, Ron wrote: On 6/16/23 07:50, Laurenz Albe wrote: On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: We want to minimise dependencies between the application and the associated PostgreSQL DB. The idea is that the

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 17:41, "Ron" schrieb: > On 6/16/23 10:18, Laurenz Albe wrote: > >> On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: > > 16. Juni 2023 14:50, "Laurenz Albe" schrieb: >> On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: >> >> We want to minimise dependencies between the

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 17:59, "Ron" schrieb: > On 6/16/23 10:54, Brainmue wrote: > >> 16. Juni 2023 17:41, "Ron" schrieb: > > On 6/16/23 10:18, Laurenz Albe wrote: >> On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: > > 16. Juni 2023 14:50, "Laurenz Albe" schrieb: >> On Fri, 2023-06-16 at 12:35

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Ron
On 6/16/23 11:05, Brainmue wrote: 16. Juni 2023 17:59, "Ron" schrieb: [snip] There's always The Cloud... spinning up a new AWS RDS Postgresql is fast and simple. (Costly, though.) We know that too, but our data should/must currently remain in-house on our own hardware. That is why we need

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 18:19, "Jeff Ross" schrieb: >> We have already looked at pgbouncer and it works with that but unfortunately >> you have to do the >> authentication in pgbouncer. Which we don't like so much. >> Regards, >> Michael > You can set up pgbouncer to authenticate in postgres: > >

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Michael Weiller
16. Juni 2023 12:04, "Thomas Markus" schrieb: > Hi > > Am 16.06.23 um 11:40 schrieb Brainmue: > >> Hello all, >> >> I am currently looking for a solution similar to Oracle Listener. >> >> Current situation: >> I have a system with multiple PostgreSQL clusters for different databases. >> Each

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Francisco Olarte
Michael: On Fri, 16 Jun 2023 at 20:26, Michael Weiller wrote: > Because with iptables or netfilter I can't forward TCP packets based on the > DNS alias name. Or is that possible? The dns alias name does not reach the listening tcp socket, it is mapped to the target record, then finally to the

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Michael Weiller
16. Juni 2023 17:41, "Ron" schrieb: > On 6/16/23 10:18, Laurenz Albe wrote: > >> On Fri, 2023-06-16 at 14:49 +, Brainmue wrote: >>> 16. Juni 2023 14:50, "Laurenz Albe" schrieb: >> >> On Fri, 2023-06-16 at 12:35 +, Brainmue wrote: >> >> We want to minimise dependencies between the

Re: Question: Multiple pg clusters on one server can be reached with the standard port.

2023-06-16 Thread Brainmue
16. Juni 2023 21:54, "Francisco Olarte" schrieb: > Michael: > > On Fri, 16. Juni 2023 at 13:53, brainmue wrote: > >> Because with iptables or netfilter I can't forward TCP packets based on the >> DNS alias name. Or is >> that possible? > > The dns alias name does not reach the listening tcp