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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jacob Burroughs <jburroughs(at)instructure(dot)com>, Dave Cramer <davecramer(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "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>, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Subject: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Date: 2024-08-20 17:01:55
Message-ID: CAKFQuwb6H2a2=AfW4s4oREMNsAOnAVsVOhmkp7DXhr1nhG1P4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 20, 2024 at 9:44 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Tue, Aug 20, 2024 at 12:42 PM David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> > I'm wondering why we are indicating that minor versions of the protocol
> are even a real thing.
>
> Because that concept is already a part of the existing wire protocol.
>
>
Right...

"
If the major version requested by the client is not supported by the
server, the connection will be rejected ... If the minor version requested
by the client is not supported by the server ... the server may either
reject the connection or may respond with a NegotiateProtocolVersion
message containing the highest minor protocol version which it supports.
The client may then choose either to continue with the connection using the
specified protocol version or to abort the connection.
"

So basically my proposal amounted to making every update a "major version
update" and changing the behavior surrounding NegotiateProtocolVersion so
it applies to major version differences. I'll stand by that change in
definition. The current one doesn't seem all that useful anyway, and as we
only have a single version, definitely hasn't been materially implemented.
Otherwise, at some point a client that knows both v3 and v4 will exist and
its connection will be rejected instead of downgraded by a v3-only server
even though such a downgrade would be possible. I suspect we'd go ahead
and change the rule then - so why not just do so now, while getting rid of
the idea that minor versions are a thing.

I suppose we could leave minor versions for patch releases of the main
server version - which still leaves the first new feature of a release
incrementing the major version. That would be incidental to changing how
we handle major versions.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2024-08-20 17:02:55 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs
Previous Message Jelte Fennema-Nio 2024-08-20 16:55:47 Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs