public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Jackson <[email protected]>
To: Evgeny Kuzin <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Add Option To Check All Addresses For Matching target_session_attr
Date: Thu, 5 Mar 2026 15:15:26 -0600
Message-ID: <CAKK5BkH5sf8w2SvQ8Jrs+PBRbswDehuam4TRyvB4kC5Apoa9ag@mail.gmail.com> (raw)
In-Reply-To: <AM9PR09MB49001B8EE023E0ADB715549E977DA@AM9PR09MB4900.eurprd09.prod.outlook.com>
References: <CAKK5BkESSc69sp2TiTWHvvOHCUey0rDWXSrR9pinyRqyfamUYg@mail.gmail.com>
	<AM9PR09MB49001B8EE023E0ADB715549E977DA@AM9PR09MB4900.eurprd09.prod.outlook.com>

While I prefer your solution, I suspect that it would not be possible/worth
it to change the behavior at this point. It seems likely there is some
niche setup out there that relies on the current logic in some capacity.

I can imagine something along the lines of: someone sets up a hostname that
points to 2 IP records that each use different network infra or something
like that. In the case where you are looking for a primary you would not
want to duplicatively check the same host in this scenario because you
already confirmed that it is not the one you are looking for. With your
patch you would be increasing connection latency, probably not by that much
granted but this is the scenario that encouraged me to implement this as a
new parameter.

All that being said I'm fine with either patch and would love to see one of
them get merged. I suspect there are a lot of extraneous haproxy's that
have been set up in the wild that would be unneeded if one of our our
patches were merged and the changes proliferate to downstream drivers.

One note on your patch though: you may want to incorporate the unit tests
that I built out for this patch in yours.


view thread (12+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Add Option To Check All Addresses For Matching target_session_attr
  In-Reply-To: <CAKK5BkH5sf8w2SvQ8Jrs+PBRbswDehuam4TRyvB4kC5Apoa9ag@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox