Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
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-18T20:27:56Z
Lists: pgsql-hackers
Attachments
- v8-0001-libpq-Grease-the-protocol-by-default.patch (application/octet-stream) patch v8-0001
- v8-0002-squash-libpq-Grease-the-protocol-by-default.patch (application/octet-stream) patch v8-0002
On Mon, Feb 9, 2026 at 3:56 PM Jelte Fennema-Nio <postgres@jeltef.nl> wrote: > Looks like a good improvement. As said before I'm fine with either location for the URL. Thanks, squashed in v8. > I'm wondering if we should be a bit more liberal in showing this error explanation, since I expect most servers to throw an error rather than send an incorrect negotiation. e.g. We could report it on hard connection closures. Or if there is "3.9999" or "version" or "_pq_" in the error message. (the message should then be "this could indicate a bug in..." because we're not fully certain) I think this is a great point, but I don't want to turn a clear signal of "bug somewhere in the server, investigate now" into "maybe a bug, probably just work around it". I don't really want anyone to be able to (correctly) say that you can ignore this message in X case. I took a look at some old implementation behaviors, and I think that if a server responds to our startup packet with either a protocol violation code or the literal grease version number (maybe in decimal, maybe in other formats) in the error message, that's probably a clear enough signal that something is wrong with the server. I've implemented that idea in v8-0002. Maybe "_pq_." would be an okay marker, too? Would this patch result in desirable behavior for a legacy pgbouncer deployment? --Jacob
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