Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qA5wl-0005NT-Ij for pgsql-general@arkaria.postgresql.org; Fri, 16 Jun 2023 09:40:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qA5wk-0007n6-0l for pgsql-general@arkaria.postgresql.org; Fri, 16 Jun 2023 09:40:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qA5wj-0007mW-Lg for pgsql-general@lists.postgresql.org; Fri, 16 Jun 2023 09:40:45 +0000 Received: from prater.isola.red ([2a0a:4cc0:1:4e:2442::2]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qA5wd-002VXD-1O for pgsql-general@lists.postgresql.org; Fri, 16 Jun 2023 09:40:41 +0000 Received: from wm.joel-hatsch.net (unknown [172.29.0.3]) (Authenticated sender: michael@weiller.eu) by prater.isola.red (Postfix) with ESMTPSA id 2F7CDC17D6 for ; Fri, 16 Jun 2023 11:40:34 +0200 (CEST) MIME-Version: 1.0 Date: Fri, 16 Jun 2023 09:40:34 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: "Brainmue" Message-ID: <71943c04e05c3c13d5cd2b287909f351@weiller.eu> Subject: Question: Multiple pg clusters on one server can be reached with the standard port. To: pgsql-general@lists.postgresql.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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= .=20 Each=20cluster is running on the same physical machine and is accessed th= rough its own DNS alias and corresponding port. I only have one single IP address available, and there is no possibility = of obtaining additional addresses. Here's an example: DNS ALIAS Host =E2=94=80> pgs1.server.net:5432 =E2=94=80> PG_Cluster1@192.168.0.1:5432 =E2=94=80> pgs2.server.net:5433 =E2=94=80> PG_Cluster2@192.168.0.1:5433 =E2=94=80> pgs3.server.net:5434 =E2=94=80> PG_Cluster3@192.168.0.1:5434 =E2=94=80> pgs4.server.net:5435 =E2=94=80> PG_Cluster4@192.168.0.1:5435 =E2=94=80> pgs5.server.net:5436 =E2=94=80> PG_Cluster5@192.168.0.1:5436 Desired solution: I still want to use the same system with different PostgreSQL clusters fo= r the various databases.=20 These=20clusters are internally accessible through different ports.=20 However,=20I would like a service on the server to receive all external r= equests on port 5432 and forward them to the corresponding internal clust= er based on the DNS alias.=20 It=20would also be desirable if this service could provide additional fea= tures like connection pooling or other functionalities. Similar to a reverse proxy. Here's an example: DNS ALIAS HOST =E2=94=80> pgs1.server.net:5432 =E2=94=80=E2=94=90 =E2=94=8C=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=AC=E2=94=80=E2=94=80> PG_Cluster1@localhost:5433 =E2=94=80> pgs2.server.net:5432 =E2=94=80=E2=94=A4 =E2=94=82 = =E2=94=9C=E2=94=80=E2=94=80> PG_Cluster2@localhost:5434 =E2=94=80> pgs3.server.net:5432 =E2=94=80=E2=94=BC=E2=94=80>=E2=94=80=E2= =94=A4 192.168.0.1:5432 =E2=94=9C=E2=94=80=E2=94=80> PG_Cluster3@localhos= t:5435 =E2=94=80> pgs4.server.net:5432 =E2=94=80=E2=94=A4 =E2=94=82 = =E2=94=9C=E2=94=80=E2=94=80> PG_Cluster4@localhost:5436 =E2=94=80> pgs5.server.net:5432 =E2=94=80=E2=94=98 =E2=94=94=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=B4=E2=94=80=E2=94=80> PG_Cluster5@localhost:5437 Is there a solution for this, and what are the advantages or limitations = that arise from it? Thank you in advance for your suggestions and help. Regards, Michael