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

From: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jacob Burroughs <jburroughs(at)instructure(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dave Cramer <davecramer(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Date: 2024-01-10 17:26:36
Message-ID: CAGECzQScQ3N-Ykv2j4NDyDtrPPc3FpRoa=LZ-2Uj2ocA4zr=4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

v6 attached with the following changes:

1. Fixed rebase conflicts with master

2. removed PGC_S_PROTOCOL (but kept PGC_PROTOCOL and PGC_SU_PROTOCOL).
This extra source level was not needed. And after some more testing I
realized this extra source level even caused problems, since protocol
messages could not override values set by SET commands anymore.

3. Added a new patch (0010) with a protocol parameter to configure
which GUCs are GUC_REPORT. This is partially to show that the GUC
interface makes sense for protocol parameters, but also because this
would be an extremely useful feature for connection poolers. And [2]
would be able to use this too.

4. Don't error, but only warn, if a GUC provided to
_pq_.protocol_managed_params is unknown. It seemed useful to be able
to specify GUCs in this list that not all Postgres versions support in
the StartupMessage, without having to guess what postgres version
you're going to connect to.

[2]: https://www.postgresql.org/message-id/flat/CAFj8pRBFU-WzzQhNrwRHn67N0Ug8a9-0-9BOo69PPtcHiBDQMA(at)mail(dot)gmail(dot)com

Attachment Content-Type Size
v6-0003-Prepare-server-code-for-addition-of-protocol-exte.patch application/octet-stream 2.0 KB
v6-0002-libpq-Handle-NegotiateProtocolVersion-message-mor.patch application/octet-stream 8.8 KB
v6-0004-libpq-Include-minor-version-number-in-PQprotocolV.patch application/octet-stream 3.3 KB
v6-0001-libpq-Remove-instance-of-hardcoded-protocol-versi.patch application/octet-stream 1.1 KB
v6-0005-Bump-protocol-version-to-3.1.patch application/octet-stream 1014 bytes
v6-0006-Add-protocol-message-to-change-parameters.patch application/octet-stream 16.2 KB
v6-0008-Add-_pq_.protocol_managed_params-protocol-extensi.patch application/octet-stream 11.8 KB
v6-0009-Add-tests-for-ParameterSet-and-_pq_.protocol_mana.patch application/octet-stream 24.5 KB
v6-0010-Add-_pq_.report_parameters-protocol-extension.patch application/octet-stream 23.4 KB
v6-0007-Add-GUC-contexts-for-protocol-extensions.patch application/octet-stream 5.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-10 19:21:47 Re: Make psql ignore trailing semicolons in \sf, \ef, etc
Previous Message Laurenz Albe 2024-01-10 17:08:37 Re: Postgres Partitions Limitations (5.11.2.3)