Re: [PATCH] libpq: try all addresses for a host before moving to next on target_session_attrs mismatch

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Evgeny Kuzin <evgeny.kuzin@outlook.com>, Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-11T19:44:36Z
Lists: pgsql-hackers
On Wed, 2026-03-11 at 15:01 +0500, Andrey Borodin wrote:
> > On 11 Mar 2026, at 03:18, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > 
> > The question is whether the overall benefits of your proposal (which certainly makes sense
> > in a setup like you describe) would be worth a performance and resource usage regression like
> > the one I described above.  Or can you see a way to modify your approach so that that problem
> > can be avoided?
> 
> Version proposed by Andrew Jackson [0] adds a connection option check_all_addrs. Off by default.
> This resolves potential problems of existing users.

Ah, ok, I didn't read the patch.  If resolving all addresses is disabled by default and
has to be enabled explicitly, I have no objection.

Yours,
Laurenz Albe



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. libpq: Add target_session_attrs parameter.