From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Question: Multiple pg clusters on one server can be reached with the standard port. |
Date: | 2023-06-19 21:09:34 |
Message-ID: | 47751285-8c76-c31f-97a4-5c6e2e7db72e@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 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.
>> How would this work with JDBC clients?
> Same as with any other client, I guess. Any reason why it should be
> different?
That goes to my ultimate point: /why/ would this work, when the point of a
database client is to connect to a database instance on a specific port like
5432, not connect to a web server.
Obviously it does/should work, but I wouldn't know where to look to lean why.
--
Born in Arizona, moved to Babylonia.
From | Date | Subject | |
---|---|---|---|
Next Message | JUN ZHI | 2023-06-20 06:11:43 | pg_service file questions |
Previous Message | Jeffrey Walton | 2023-06-19 19:00:32 | Re: OpenSSL version 3 |