Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta
Jelte Fennema <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>,
Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Heikki Linnakangas <hlinnaka@iki.fi>, Robert Haas <robertmhaas@gmail.com>
Date: 2026-02-18T23:11:02Z
Lists: pgsql-hackers
On Wed, 18 Feb 2026 at 21:28, Jacob Champion
<jacob.champion@enterprisedb.com> 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.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
libpq: Grease the protocol by default
- 4966bd3ed95e 19 (unreleased) landed
-
libpq: Prepare for protocol grease during 19beta
- d8d7c5dc8f74 19 (unreleased) landed
-
doc: Expand upon protocol versions and extensions
- e3d37853ecd5 19 (unreleased) landed
-
libpq_pipeline: Test the default protocol version
- 9b9eaf08ab2d 19 (unreleased) landed