Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>,
Jacob Champion <jacob.champion@enterprisedb.com>,
Heikki Linnakangas <hlinnaka@iki.fi>,
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-19T04:53:10Z
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
Robert Haas <robertmhaas@gmail.com> writes: > I feel like what you're really complaining about here is that libpq is > not properly versioned. We've just been calling it libpq.so.5 forever > instead of bumping the version number when we change stuff. Maybe we > should start doing that, because that's exactly what version numbers > are for. Alternatively or in addition, maybe we should have a function > in libpq that returns its own PostgreSQL version, because that would > solve this problem for all cases, whereas what you're proposing here > only solves it for this particular case (and at the risk of breaking > things for somebody). Not really. *No* runtime test is adequate for discovery of a new library API, because if you try to call a function that doesn't exist in the version you have, you will get a compile or link failure long before you can call any inquiry function. Bumping the .so's major version just creates another way to fail at link time, so I'm not seeing how that would make this better. > I just don't see why this particular change is special. We add new > libpq interfaces all the time and we don't do anything to make that > easy for libpq clients to discover. Indeed. But we have actually paid a little bit of attention to that, in the form of inventing #define symbols that can be tested at compile time. (There's an open item for 17 concerning failure to do that for some new-in-17 APIs.) Yeah, it's grotty, but runtime checks aren't especially relevant here. In any case, please let us not abuse the wire protocol version number as an indicator of the libpq-to-application API version. They are fundamentally different things. regards, tom lane