Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>,
Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Jacob Burroughs <jburroughs@instructure.com>, Dave Cramer <davecramer@gmail.com>, Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "Andrey M. Borodin" <x4mmm@yandex-team.ru>,
Pavel Stehule <pavel.stehule@gmail.com>, Jeff Davis <pgsql@j-davis.com>, Peter Eisentraut <peter@eisentraut.org>, Daniele Varrazzo <daniele.varrazzo@gmail.com>
Date: 2024-08-20T17:30:53Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
libpq: Add min/max_protocol_version connection options
- 285613c60a7a 18.0 landed
-
libpq: Handle NegotiateProtocolVersion message differently
- 5070349102af 18.0 landed
-
Add PQfullProtocolVersion() to surface the precise protocol version.
- cdb6b0fdb0b2 18.0 landed
-
Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion
- 516b87502dc1 18.0 landed
-
libpq: Handle NegotiateProtocolVersion message
- bbf9c282ce92 16.0 cited
-
Provide for forward compatibility with future minor protocol versions.
- ae65f6066dc3 11.0 cited
On Tue, Aug 20, 2024 at 8:24 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote: > > Put another way: for a middlebox on the connection (which may be > > passively observing, but also maybe actively adding new messages to > > the stream), what is guaranteed to remain the same in the protocol > > across a minor version bump? Hopefully the answer isn't "nothing"? > > I don't think we can give any future guarantees like that. If you have a > middlebox on the connection, it needs to fully understand all the > protocol versions it supports. (GMail has catastrophically unthreaded this conversation for me, so apologies if I start responding out of order) Many protocols provide the list of assumptions that intermediates are allowed to make within a single group of compatible versions, even as the protocol gets extended. If we choose to provide those, then our "major version" gains really useful semantics. See also the brief "criticality" tangent upthread. > That seems a bit tangential to the PQprotocolVersion() function though. > A middlebox like that would probably not use libpq. It's applicable to the use case I was talking about with Jelte. A libpq client dropping down to the socket level is relying on (implicit, currently undocumented/undecided, possibly incorrect!) intermediary guarantees that the protocol provides for a major version. I'm hoping we can provide some, since we haven't broken anything yet. If we decide we can't, then so be it -- things will break either way -- but it's still strange to me that we'd be okay with literally zero forward compatibility and still call that a "minor version". --Jacob