Re: [PATCH] libpq: try all addresses for a host before moving to next on target_session_attrs mismatch
Andrey Borodin <x4mmm@yandex-team.ru>
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Evgeny Kuzin <evgeny.kuzin@outlook.com>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-05T15:16:03Z
Lists: pgsql-hackers
> On 5 Mar 2026, at 19:55, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > TBH, I'd say that your DNS setup is broken and you should fix it. > It makes no sense to have the same DNS entry pointing to both > read-write and read-only hosts. The proposed patch will mainly > result in useless connection attempts in more-sanely-constructed > setups. This is very desired feature by cloud providers. We sell PGaaS clusters which are just a bunch of hosts. Each of these hosts can became primary any time. Currently, when user adds more hosts they have to redeploy\reconfigure their app. Unless user uses pgx that already works this way, then we can just give them one FQDN for whole cluster and update DNS records. This was proposed before [0] and I think Andrew and Evgeny could join efforts. Certainly, this can be implemented without affecting those who do not need it. Best regards, Andrey Borodin. [0] https://commitfest.postgresql.org/patch/5396/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
libpq: Add target_session_attrs parameter.
- 721f7bd3cbcc 10.0 cited