Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta
Date: 2026-01-24 10:10:27
Message-ID: CAGECzQTtBa6u2-dxv83g_-7ssop-Ds5-DFibrUin+RfDOtsJFg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 24 Jan 2026 at 00:38, Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> WDYT?

Overall, I think the changes and the split look fine. And I'd be happy
with having it committed as is.

A few thoughts on the docs:
1. I like the version table split. I think it might be better to do
the same for protocol extensions too. Primarily because I think the
tiny empty cell at the start of each row looks weird (see screenshot),
but also just for consistency.
2. In my v5 I created a dedicated section header for protocol
extensions instead of including it in the extension. I think that's
slightly nicer, primarily so you can link to that section from the
StartupMessage docs (including the introductory paragraph), instead of
having to link to the table.
3. In the table in my v5 I use "extension name" as a column instead of
"parameter name" so I did not have to include the "_pq_." prefix. I'm
going a bit back and forth between which I like better.
4. I think mentioning the "_pq_." prefix in the paragraph above the
extension table would be good. Otherwise once we get more extensions
you only learn about it once you get to the reserved extensions
section.

A few thoughts on the implementation:
1. If you like the randomization I did in my v5-0003, but don't want
to commit it yet. Then I think it would be good to change the reserved
protocol extension to rename to _pq_.test_protocol_negotiation_0000.
So that if we commit it later we don't have both
_pq_.test_protocol_negotiation and _pq_.test_protocol_negotiation_XXXX
reserved, but only have the one with a suffix reserved.
2. It might be nice to also error duplicate keys in NegotiateProtocolVersion.

Attachment Content-Type Size
image/png 49.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2026-01-24 11:22:15 Re: proposal: plpgsql - FOREACH t IN JSON ARRAY expr
Previous Message Amit Kapila 2026-01-24 09:53:44 Re: unnecessary executor overheads around seqscans