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: "Andres Freund" <andres@anarazel.de>, "PostgreSQL Hackers"
<pgsql-hackers@lists.postgresql.org>, "Heikki Linnakangas"
<hlinnaka@iki.fi>, "Robert Haas" <robertmhaas@gmail.com>
Date: 2026-01-23T23:39:56Z
Lists: pgsql-hackers
Attachments
- v5-0001-libpq-Request-protocol-version-3.9999-to-GREASE-t.patch (text/x-patch) patch v5-0001
- v5-0002-fixup-libpq-Request-protocol-version-3.9999-to-GR.patch (text/x-patch) patch v5-0002
- v5-0003-Implement-more-complicated-grease.patch (text/x-patch) patch v5-0003
- v5-0004-libpq-Reconnect-if-requested-grease-but-version-i.patch (text/x-patch) patch v5-0004
- v5-0005-Update-libpq-docs-for-better-grease.patch (text/x-patch) patch v5-0005
On Thu Jan 15, 2026 at 1:31 AM CET, Jacob Champion wrote: > Per offline confusion/discussion: I plan to work on a grease feature > for beta _regardless_ of whether a "production-grade" > max_protocol_version=grease option turns out to be viable before > feature freeze; I saw that you committed a few patches. Given that you said you wanted to wordsmith the last one, this seemed like a good time to send in some of my own improvements in that regard. (I did not change the GREASE mentions, since you clearly had something in mind for those). 0001 is mine an your squash commit, squashed together and rebased on top of main. 0002 is the improvements to the docs. The one important thing is a change from 3.2 to 3.0. Other than that it introduces a table for tracking protocol extensions. That way other patches (like GoAway) that introduce a protocol extension already have some location in the docs where it can be listed. 0003-0005 are an attempt at making a bit more of a robust GREASE. 0003 makes it "harder to still implement negotation incorrectly". Then 0004 makes it not a hard failure if you connect with max_protocol_version=grease to a new server. Then 0005 adds some preliminary docs. These almost certainly need some more discussion. And I don't expect them to necessarily get in for PG19, but if you like some of it feel free to pick and take what you want from them. e.g. the randomized protocol extensions are kinda nice IMO. But I'm not exactly sure if the randomized version number is that much more useful though than a fixed one.
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