pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Markus <t.markus@proventis.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Question: Multiple pg clusters on one server can be reached with the standard port.
Date: Mon, 19 Jun 2023 06:06:33 +0200
Message-ID: <c5f9c9b4-7a1f-8a35-406c-d7cc34285bcd@proventis.net> (raw)
In-Reply-To: <d869925784c9af50aa4379d4ab5ffae2@weiller.eu>
References: <0c2dd853-08ec-dbed-00c3-a680ae711d89@proventis.net>
	<71943c04e05c3c13d5cd2b287909f351@weiller.eu>
	<d869925784c9af50aa4379d4ab5ffae2@weiller.eu>

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?
> Because with iptables or netfilter I can't forward TCP packets based on the DNS alias name. Or is
> that possible?
>
> I have the same problem with nginx. I just looked in the documentation again but I can't find a way
> to distinguish which cluster to forward to based on the DNS alias.
> Do you have an example for me?
>
> 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 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 with your hostname and use this 
variable in your server definition.

best regards
Thomas



Attachments:

  OpenPGP_0x9794716335E9B5AF.asc (application/pgp-keys, 3.1K) download

  OpenPGP_signature (application/pgp-signature, 839B) download

view thread (37+ messages)  latest in thread

Message-ID: <c5f9c9b4-7a1f-8a35-406c-d7cc34285bcd@proventis.net>
Permalink:  ../c5f9c9b4-7a1f-8a35-406c-d7cc34285bcd@proventis.net/
Also on:    postgresql.org/message-id/c5f9c9b4-7a1f-8a35-406c-d7cc34285bcd@proventis.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: t.markus@proventis.net
  Subject: Re: Question: Multiple pg clusters on one server can be reached with the standard port.
  In-Reply-To: <c5f9c9b4-7a1f-8a35-406c-d7cc34285bcd@proventis.net>
  References: <0c2dd853-08ec-dbed-00c3-a680ae711d89@proventis.net> <71943c04e05c3c13d5cd2b287909f351@weiller.eu> <d869925784c9af50aa4379d4ab5ffae2@weiller.eu> <c5f9c9b4-7a1f-8a35-406c-d7cc34285bcd@proventis.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox