Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

Jelte Fennema-Nio <me@jeltef.nl>

From: Jelte Fennema-Nio <me@jeltef.nl>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Jacob Burroughs <jburroughs@instructure.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Dave Cramer <davecramer@gmail.com>, "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-03-08T11:47:15Z
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 →
  1. libpq: Add min/max_protocol_version connection options

  2. libpq: Handle NegotiateProtocolVersion message differently

  3. Add PQfullProtocolVersion() to surface the precise protocol version.

  4. Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion

  5. libpq: Handle NegotiateProtocolVersion message

  6. Provide for forward compatibility with future minor protocol versions.

Attachments

Fixed some conflicts again.

To summarize the current state of this patchset, it consists of 5
different parts that could be merged separately:
1. 0001-0005 are needed for any protocol change, and hopefully
shouldn't require much discussion
2. 0006-0009 introduce a new protocol message that can be used to
update GUCs. I think we might want some discussion on the design of
the protocol message, but I think the behaviour has all feedback
incorporated.
3. 0010 Adds GUC contexts for protocol extensions, in the way that Tom
Lane suggested.
4. 0011 Adds a way to mark some GUCs as only changeable using protocol
messages, there's still some discussion needed on this (I can remove
this from the patchset if that makes it easier).
5. 0012 Adds some additional tests for some of the previous features
6. 0013 Add a protocol parameter to control which GUCs have
GUC_REPORT. Quite straightforward imho.