libpq: Bump protocol version to version 3.2 at least until the first/second beta
Jelte Fennema-Nio <me@jeltef.nl>
From: "Jelte Fennema-Nio" <me@jeltef.nl>
To: "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Cc: "Heikki Linnakangas" <hlinnaka@iki.fi>, "Robert Haas"
<robertmhaas@gmail.com>
Date: 2025-10-23T13:56:35Z
Lists: pgsql-hackers
Attachments
- v1-0001-Add-test-for-libpq-its-default-protocol-version.patch (text/x-patch) patch v1-0001
- v1-0002-libpq-Bump-default-protocol-version-to-3.2.patch (text/x-patch) patch v1-0002
The main reason that libpq does not request protocol version 3.2 by default is because other proxy/server implementations don't implement the negotiation. This is a bit of a chicken and egg problem: We don't bump the default version that libpq asks, but proxies will only implement version negotation when their users run into issues. So I'm proposing that we bump the default protocol version that libpq requests on the master branch, so that users running the latest master against a proxy that does not support the version negototian will be notified. They can then push the author of the proxy to implement the NegototiateProtocolVersion message. Depending on how this works in practice we'll likely still want to revert this change before we actually release PG19. If we do that before 19beta1 we still have roughly half a year where people will test the ecosystem. I'd even suggest that we only revert before 19beta2, so that people testing beta1 will also be testing the ecosystem for version negotiation issues. In any case, the sooner we commit this the more testing we get, Note that users still have a way out to connect to the server by manually setting max_protocol_version=3.0 in the connection string.
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