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 1qBITg-0000PB-Nw for pgsql-general@arkaria.postgresql.org; Mon, 19 Jun 2023 17:15:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qBITe-0006h1-Gc for pgsql-general@arkaria.postgresql.org; Mon, 19 Jun 2023 17:15:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qBITe-0006gQ-6E for pgsql-general@lists.postgresql.org; Mon, 19 Jun 2023 17:15:42 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qBITa-003Sp5-AZ for pgsql-general@lists.postgresql.org; Mon, 19 Jun 2023 17:15:40 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 52BC067E6B; Mon, 19 Jun 2023 19:15:36 +0200 (CEST) Date: Mon, 19 Jun 2023 19:15:36 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Question: Multiple pg clusters on one server can be reached with the standard port. Message-ID: <20230619171536.2kcrdor36rqchicq@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <0c2dd853-08ec-dbed-00c3-a680ae711d89@proventis.net> <71943c04e05c3c13d5cd2b287909f351@weiller.eu> <20230619103335.xyagd43uhneducxz@hjp.at> <0f467ff1-8cdb-2460-75d6-0e0e4497890f@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ymf4ibix6dzrxv3q" Content-Disposition: inline In-Reply-To: <0f467ff1-8cdb-2460-75d6-0e0e4497890f@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ymf4ibix6dzrxv3q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 nginx > > simply doesn't have that information and therefore can't act on it. [...] > > So (again, as Francisco already wrote) the best way is probably to write > > a simple proxy which uses the database (not DNS) name for routing. I > > seem to remember that nginx has a plugin architecture for protocols so > > it might make sense to write that as an nginx plugin instead of a > > standalone server, but that's really a judgement call the programmer has > > to make. Another possibility would of course be to extend pgbouncer to > > do what the OP needs. >=20 > How would this work with JDBC clients? Same as with any other client, I guess. Any reason why it should be different? hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --ymf4ibix6dzrxv3q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmSQjTMACgkQ8g5IURL+ KF1BvA//Q+ss/0JYWOlWSlj5FaPNGwwsVp8ivOLKA/oytnhI/g+NFd0rSUwgZX0K MSSjfqXco5M+PAqGIlK5ua4uhGV9MMYEbeypPPyDzdkuLgtw610my07nRUiO0CrM 0tgno0Vkc4QxX4JO0IMbcWNMEuznms3MC5mXswhEyS8CFwunz9p2JGZWKct5WZ98 iHvcKVpqjDq4Kl9QmiRe3neM9guexUFU0N9jNaruYoOtASb+eqzSNxqzpx34AOWS 4c2TvaT+T/kGLcL8kUUpz+ePcawtss20q+VJ7yM+XjlB/Pc1pUU0P/NbnpdIBA+N CZgmQIM93SG4ZcZtFoD3owmpHO3bMDkU5nbRzcV2vtb+DmA6bPqkDu4MUV0s47xx XCe4IEtikhLlAcxKq7V8Sw/XuRpiF/Xz60xdDVvf3G1HX35WzGN6iZ5SIYfVFeXb BJxPmoRLZmGgSVnZGydfMVNB9mzNDSgfBbgYgHB88hBlhnUFG00DYR8y10ik3OwB TOFcx+eQjwNzHcTdBzyEA+OMr2PDuFG9wMmkgdClykISTQXH/6wkoifXfc4jlG4Y TeUZp3xKRcPmVNoi1Q02h0nV+8FPXRm7/Q3AUxMNuoHeYYQz6kUItEhgYSjrtQhG cX9I4KngGNUqD6J6gcmlpfOxq0UQdU4VCquIsX+mbq4DlKND8ZM= =Xo6B -----END PGP SIGNATURE----- --ymf4ibix6dzrxv3q--