Re: Proposal to allow setting cursor options on Portals - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Proposal to allow setting cursor options on Portals
Date
Msg-id CAGECzQSHKR2LtBSnDT_bjdpE1=cVzZLRcb2k5d_K=BMvJCFihg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal to allow setting cursor options on Portals  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Proposal to allow setting cursor options on Portals
Re: Proposal to allow setting cursor options on Portals
List pgsql-hackers
On Wed, 14 Jan 2026 at 20:24, Robert Haas <robertmhaas@gmail.com> wrote:
> But I wonder whether we should just consider slipping
> things like this into the protocol without bumping the version at all.

I feel like I've said this many times already, but I really do not
understand why there's such a hesitation on bumping the minor protocol
version. Bumping the minor protocol version has zero downsides to me.
IMO we could bump it every PG release even if we don't make any
changes to the protocol. Nothing would break. The only thing that
breaks things is requesting anything other than 3.0, because most
proxies haven't implemented NegotiateProtocolVersion. But hopefully
that will be a concern of the past once Jacob merges the grease
stuff[1]. After that it doesn't matter what minor version is
requested, if it's 3.2, 3.3, or 3.456. Requesting any of those will
not cause breakage.

> That makes me a bit nervous because it kind of makes a mockery of the
> idea of a version number, but it's also not entirely without
> precedent. For example, COPY BOTH mode didn't use to exist, and now it
> does, and the protocol version number didn't change in the process.

I think CopyBoth is very special, because it's only used in logical
replication. In a sense it's practically a protocol extension, because
it is only sent by the server if the client explicitly requested it
through a keyword in the StartupMessage (replication=database).

As a maintainer of a proxy, I'd be pretty annoyed if clients start
sending fields or messages that I don't expect, without *something* in
the StartupMessage advertising that that will happen. This specific
patch would be fine for pgbouncer, because it only parses the first
few fields of the Bind message. But e.g pgcat seems to parse the whole
Bind message[2]

[1]: https://www.postgresql.org/message-id/flat/DDPR5BPWH1RJ.1LWAK6QAURVAY@jeltef.nl
[2]: https://github.com/postgresml/pgcat/blob/5b038813eb14f181434ab7b5509e74d9b1fe123b/src/messages.rs#L1019-L1064

P.S. This *really* is my final on-list message on the topic of bumping
protocol version numbers . Off-list I'm happy to explain to people and
maybe I'll reconsider re-opening the discussion in a few years. But
the current discussion is only going in circles, and I'd rather spend
my energy on something that is useful.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Optimize LISTEN/NOTIFY
Next
From: Chao Li
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)