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

2023-06-20 Thread Peter J. Holzer
On 2023-06-20 10:10:47 -0500, Ron wrote: > On 6/20/23 09:54, Peter J. Holzer wrote: > > On 2023-06-19 16:09:34 -0500, Ron wrote: > > > On 6/19/23 12:15, Peter J. Holzer wrote: > > > On 2023-06-19 07:49:49 -0500, Ron wrote: > > > On 6/19/23 05:33, Peter J. Holzer wrote: > > >

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

2023-06-20 Thread Ron
On 6/20/23 09:54, Peter J. Holzer wrote: On 2023-06-19 16:09:34 -0500, Ron wrote: On 6/19/23 12:15, Peter J. Holzer wrote: On 2023-06-19 07:49:49 -0500, Ron wrote: On 6/19/23 05:33, Peter J. Holzer wrote: So (again, as Francisco already wrote) the best way is probably

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

2023-06-20 Thread Peter J. Holzer
On 2023-06-19 16:09:34 -0500, Ron wrote: > On 6/19/23 12:15, Peter J. Holzer wrote: > On 2023-06-19 07:49:49 -0500, Ron wrote: > On 6/19/23 05:33, Peter J. Holzer wrote: > So (again, as Francisco already wrote) the best way is probably > to write > a simple

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

2023-06-19 Thread Ron
On 6/19/23 12:15, Peter J. Holzer wrote: On 2023-06-19 07:49:49 -0500, Ron wrote: On 6/19/23 05:33, Peter J. Holzer wrote: As Francisco already pointed out, this can't work with nginx either. The client resolves the alias and the TCP packets only contain the IP address, not the alias which was

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

2023-06-19 Thread Peter J. Holzer
On 2023-06-19 07:49:49 -0500, Ron wrote: > On 6/19/23 05:33, Peter J. Holzer wrote: > > As Francisco already pointed out, this can't work with nginx either. The > > client resolves the alias and the TCP packets only contain the IP > > address, not the alias which was used to get that address. So

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

2023-06-19 Thread Ron
On 6/19/23 05:33, Peter J. Holzer wrote: [snip] You cant setup firewall rules basedon dns names. firewall rules are based on ip adresses and dns resolution happens on rule creation. I dont have an example for nginx. As I remember nginx resolves dns names only for variables. So setup a variable

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

2023-06-19 Thread Brainmue
19. Juni 2023 13:17, "Dominique Devienne" schrieb: > On Mon, Jun 19, 2023 at 1:01 PM Thomas Markus wrote: > >> Am 19.06.23 um 12:33 schrieb Peter J. Holzer: >>> As Francisco already pointed out, this can't work with nginx either. >> anyway, fw or nginx cant look into tcp streams > Traefik can

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

2023-06-19 Thread Dominique Devienne
On Mon, Jun 19, 2023 at 1:01 PM Thomas Markus wrote: > Am 19.06.23 um 12:33 schrieb Peter J. Holzer: > > As Francisco already pointed out, this can't work with nginx either. > anyway, fw or nginx cant look into tcp streams > Traefik can proxy PostgreSQL, I've read, so maybe that's something you

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

2023-06-19 Thread Thomas Markus
Hi, Am 19.06.23 um 12:33 schrieb Peter J. Holzer: As Francisco already pointed out, this can't work with nginx either. The client resolves the alias and the TCP packets only contain the IP address, not the alias which was used to get that address. So nginx simply doesn't have that information

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

2023-06-19 Thread Peter J. Holzer
On 2023-06-19 06:06:33 +0200, Thomas Markus wrote: > Am 16.06.23 um 13:53 schrieb Brainmue: > > With firewall you mean an additional software, right? > > Because with iptables or netfilter I can't forward TCP packets based on the > > DNS alias name. Or is > > that possible? > > > > I have the

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

2023-06-18 Thread Thomas Markus
Hi, Am 16.06.23 um 13:53 schrieb Brainmue: possible solutions: * set up a firewall rule to forward connection * use a tcp proxy (nginx can do that) * check pg_bouncer best regards Thomas Hello Thomas, Thank you for your quick reply. With firewall you mean an additional software, right?

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

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 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 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 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 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 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 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 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 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 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 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: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 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 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 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 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

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: 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 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 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 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 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

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