On Wed, 18 Feb 2026 at 21:28, Jacob Champion
<[email protected]> wrote:
> Would this patch result in desirable behavior for a legacy pgbouncer
> deployment?
I tried it out with PgBouncer commit f7ffd67ed8 (the one right before
NegotiateProtocolVersion support was added) and got the following back
with psql. So yes it works:
❯ psql -p 6432
psql: error: connection to server at "localhost" (127.0.0.1), port
6432 failed: FATAL: bad packet header: '000000710003270f'
This indicates a bug in either the server being contacted
or a proxy handling the connection. Please consider
reporting this to the maintainers of that software.
For more information, including instructions on how to
work around this issue for now, visit
https://www.postgresql.org/docs/devel/libpq-connect.html#LIBPQ-CONNECT-MAX-PROTOCOL-VERSION
I think "_pq_." would be very unlikely to cause false positives too
*currently*, because it's the only protocol extension we're currently
requesting. But I'm not sure that will remain true after we actually
add support for some extensions (e.g. the error could be about an
invalid option being used for a valid protocol extension). So I'd say
let's stay on the "we're sure it's a bug" side and not use it as a
heuristic. I still have some not so secret hope that you (or another
committer) will have time to look at my GoAway patch and realise it's
pretty trivial and safe to commit.