Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: Jacob Champion <jacob.champion@enterprisedb.com>,
Heikki Linnakangas <hlinnaka@iki.fi>, 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-19T14:16:01Z
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 Mon, Aug 19, 2024 at 3:30 AM Jelte Fennema-Nio <postgres@jeltef.nl> wrote: > But **now I actually feel much more strongly about reusing the same > function**. Because by introducing a new function we actually break > the users of the second use-case. > > P.S. The docs for PQprotocolVersion[1] have never said that this > function only returns the major protocol version. And by using the > word "Currently" it has always suggested that new return values could > be introduced later, and thus for feature detection you should use >= > 3 If somebody is using PQprotocolVersion() to detect the arrival of a new protocol version, it stands to reason that they only care about new major protocol versions, because that's what the function is defined to tell you about. Anyone who has done a moderate amount of looking into this area will understand that the protocol has a major version number and a minor version number and that this function only returns the former. Therefore, they should expect that the arrival of a new minor protocol version won't change the return value of this function. I really don't understand why we're still arguing about this. It seems to me that we've established that there is some usage of the existing function, and that changing the return value will break something. Sure, so far as we know that something is "only" regression tests, but there's no guarantee that there couldn't be other code that we don't know about that breaks worse, and even there isn't, who wants to break regression tests when there's nothing actually wrong? Now we could decide we're going to do it anyway because of whatever reason we might have, but it doesn't seem like that's what most people want to do. I feel like we're finally in a position to get some things done here and this doesn't seem like the point to get stuck on. YMMV, of course. -- Robert Haas EDB: http://www.enterprisedb.com