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: Dave Cramer <davecramer@gmail.com>
Cc: Jelte Fennema-Nio <me@jeltef.nl>, Robert Haas <robertmhaas@gmail.com>,
Peter Smith <smithpb2250@gmail.com>,
Jacob Burroughs <jburroughs@instructure.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>
Date: 2024-04-05T16:43:36Z
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
Dave Cramer <davecramer@gmail.com> writes: > On Fri, 5 Apr 2024 at 12:09, Jelte Fennema-Nio <me@jeltef.nl> wrote: >> Setting PGC_PROTOCOL gucs would be allowed in the startup packet, >> which is fine afaict because that's also something that's part of the >> protocol level and is thus fully controlled by client libraries and >> poolers) But other than that: Yes, conf files, ALTER, and SET cannot >> change these GUCs. > +1 I don't buy that argument, actually. libpq, and pretty much every other client AFAIK, has provisions to let higher code levels insert random options into the startup packet. So to make this work libpq would have to filter or at least inspect such options, which is logic that doesn't exist and doesn't seem nice to need. The other problem with adding these things in the startup packet is that when you send that packet, you don't know what the server version is and hence don't know if it will take these options. What's so bad about insisting that these options must be sent in a separate message? regards, tom lane