Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgSkw-00DNnU-2D for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 19:11:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgSkv-000RjR-2Y for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 19:11:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgSkv-000RjC-16 for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 19:11:41 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgSks-000cFZ-2t for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 19:11:40 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-3ec3cdcda4eso955437fac.1 for ; Thu, 15 Jan 2026 11:11:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768504299; cv=none; d=google.com; s=arc-20240605; b=IGyOrWi6hHJJtxfk/6b4z7TUhRnxeuzuUM84BIpeLnVIAIeITSHffkZp/7s9ceOfYV uFbxT/EZMPB9AnO3lG6u47uszhdsupdwB9JHNu5sg0c48scHcTZEczo0677LGndwGRy9 HWSMizZ0AUFknbiSj6aaWD6ySmDL0jkdiEPi9TheWQ2WrK2kv6MrNZC+HVv38XiZJDko pHroTaT/O1UC/cGU3Co6AYJ3AyI4xHwdfxXi2zp1I4OjX23wE+kt06Y20f9KULLKuSW5 tDvwIu+/k/AFVZMoXJNPeom+K86P1HnSB7XbQIfyFSXcFbMz0xtebl+XRJO6WmIdm57Y a/ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=6r2d1p2DeBPzrSkM1dCbpA6GYoDi86sZtchtUg6xbJw=; fh=3K0YJOYxItGsw7grKTe+3ueWrq/vYXD9BdE1ftPzeRY=; b=CgkSS5MeK8dF5NIFP+ZGdi2J5Lsv8GmEvpY7ljZnBKk4Qk47bzex3FYLId+6FjpECD SNvXoJweqFWbX9mjraBb3zd2uwq6w1c1qNicqazHIziQs1/DvBB15SMpGyyCUi8Lx+Uw wYWpeINEkoH1Vz8RVjEmmmjt9ooUnHW1YUEqmsmbxfx4Z0SzqH8AbP5CKT6WQkMAOKSp fm0zJxOMe2altNP/3vIOpZWQB7gIo3hT9VwtV5hM7bTyBMRIaIemuGD5Vd25+5ytHNSp HdiwGP0RvIstkeIuM0lmKjFDWnOPqN5dHSXW1Y1LHEFuNkx5e+yD8XBy+c5hFrmO9fAT MOPQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768504299; x=1769109099; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6r2d1p2DeBPzrSkM1dCbpA6GYoDi86sZtchtUg6xbJw=; b=GGRWx6Cg2mJa/v2D79m0gn0c6e78L0IxOOK3MnD26VbRmyDaKSrONo0/BfKNyNTtJr CIludRx5Qa4LvDch+qGUddcgstlwOQvDEvbtqZ0E6W+4x8TlPsqPwyE5XQeUi7uyriUD 0IMPagNhWAJsQEeNe7E9Nbd7dzjQEt79LuvKZ3BwGnIITenQKLNqVL+GH3U2dDn02+K0 ZvMtP8DWqpOggifeZ2lh3cIWKhssB9qJIIRNv37KbvDX0gU1UYvyYbMxksSPywDPbmLX cYFRP+J249BFFazHi61qjlrxCH8IfWFK9pbN5ghnjgXz5NssU5dMMgOVg222WvwUyBFu XsCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768504299; x=1769109099; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6r2d1p2DeBPzrSkM1dCbpA6GYoDi86sZtchtUg6xbJw=; b=aM4AfBY8HKN6mlepOG1nps6qTXxW4zxN9jQVlrUnjkWjrKp8XuLO+Mg0Zty7r1L8mZ Uf11J5Q/IbXUPrDKhoFktbyMLKBhuW/zrtIcMZQlmi/yEgKDbRfgLg1V2ZckKSxqejZI g9LBHVM2JFJEe6UfEdglXz1ekIHfA6/+JL7GTxJp6FhOYAtnC09ihr71KreE8QmIpEGH qURH4EmiQsSckqrhzETMlRkfv8gl8qRmVQjMfkImGh9O9VBQ/IprpuqWQZUzIV2iiC7f eZuqltFMW5X+M9T5f888hCZuYC56EXFBFP6NA6QIErrSkO37NIu790JiKkXkAEAZsrTE 7e4w== X-Forwarded-Encrypted: i=1; AJvYcCWtyY99G/anWa3dYnl1X1HedOzGP9GkyYfhWa1ddSgRWgscGT1Szgbp76THE9A3swV7Z2Z0y/hL1KfIQW8Q@lists.postgresql.org X-Gm-Message-State: AOJu0YxaGOGi2ZbJ+XgHUcYUYv82PJEEkDOXL/eXhX4DrQuEU8fHuXJo ARdUY3BYOydPzwya88k0gqY2aow+Kyn7VuMioMYUm/GFBL69VlIlxib1H6+yGDpkXOWKGXrtcZa umjSZjoBOBXz5Dc9b/gKM1WSphJgV1m8= X-Gm-Gg: AY/fxX6/7hfmhC7WE2H/Wmo22mncAF4lp1UkpEERxiarJyJ6B0EehUsavThZ4pwYtvF 9mkm9AMrUfCJ7kgjVbfXhtQ2+b7hNpzQHoOauP7rr1R5SJXA0no2zVleMxWWEnaXZw5nmxB7ED7 IOCTmJWZqvaP8e1Yma9sV/p/wG8Zk569IPRYt3k5dkd9G1T8qdi1vBWDPdE6db1GkRwdpvyRKIC PU9qxZRgzeVUkb64wxr3LuDMAIis01eNk9iqcK96l+fx8YhWEIXQejL748oH808hBvm5A== X-Received: by 2002:a05:6820:221d:b0:65c:fe8b:53c7 with SMTP id 006d021491bc7-661179e61fbmr357960eaf.56.1768504298978; Thu, 15 Jan 2026 11:11:38 -0800 (PST) MIME-Version: 1.0 References: <2155281.1767900170@sss.pgh.pa.us> <431484.1768433414@sss.pgh.pa.us> In-Reply-To: From: Dave Cramer Date: Thu, 15 Jan 2026 14:11:22 -0500 X-Gm-Features: AZwV_QhSt6tzrRqC5qTyK0vv3KwTofp3pQ5-wJzbNQ-JUtr4oAqfmIMblbQ6MkI Message-ID: Subject: Re: Proposal to allow setting cursor options on Portals To: Robert Haas Cc: Tom Lane , Jelte Fennema-Nio , Jacob Champion , PostgreSQL Hackers , Heikki Linnakangas Content-Type: multipart/alternative; boundary="000000000000864439064871fe97" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000864439064871fe97 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 15 Jan 2026 at 14:00, Robert Haas wrote: > On Thu, Jan 15, 2026 at 5:33=E2=80=AFAM Dave Cramer wrote: > > I would argue in the case of "cursor with hold" this should have been i= n > the original protocol. > > This is not an added feature this just enables an existing feature in > the server. This is not unlike widening the cancel key. > > Something like encryption would be a feature that I could see using the > extension mechanism > > I agree that encryption is a better fit for the extension mechanism. > But I don't really agree that this isn't a new feature. Exposing > existing functionality in new ways counts as a new feature in my book. > > >> Having said that, I share Robert's distaste for "silent" protocol > >> bumps that change the behavior without any negotiation. > > > > My understanding reading his message he was in favour of it > > Well, my feelings are mixed on that point, honestly. If the server > needs to know whether the client supports something, you pretty much > have to have a protocol negotiation of some kind, whether that's a > version bump or an extension. Otherwise, the server simply has no way > to find out what the client supports. In the opposite direction, it's > more fuzzy: the client can see the server version number, and so can > draw some conclusions on that basis. We have used this for protocol > changes in the past. However, something like changing the cancel key > or adding cursor with hold affects a lot more clients than adding > CopyBoth that is only triggered by a very specific command in a > special mode. And it's not that theoretically appealing to conflate > the *protocol* version number with the *server* version number. > Sometimes things that are not theoretically appealing are nonetheless > pragmatically appealing. But it is not really clear to me whether this > is one of those cases, and it sounds like Tom and Jacob think it > isn't. I could probably be persuaded either way on the best thing to > do here in a vacuum, but I'm strongly disinclined to argue against two > committers who have a firm position on the topic already. > > I think what I like least about this proposal is the feeling that > we're about to embark on a long slippery slope of changing the > protocol a little bit in every new PG version. The cancel key thing is > a small change, look here's another. If we just keep doing that, we'll > end up with either a lot of minor version bumps or a lot of > extensions. I don't foresee a good outcome either way. This is a > widely used, widely adopted protocol. The idea that we can just start > tweaking it a little bit every year and have nothing bad happened > seems wild, regardless of how we do the tweaking. This leaves us with an all or nothing solution, which practically means we do nothing, since we have to wait until we have a sufficient backlog of changes or features to change the protocol. I see that as untenable, unless you are now advocating for using extensions for everything ? Dave --000000000000864439064871fe97 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Thu, 15 Jan 2026 at 14:00, Robert Ha= as <robertmhaas@gmail.com&g= t; wrote:
On Thu, Jan 15, 2026 at = 5:33=E2=80=AFAM Dave Cramer <davecramer@gmail.com> wrote:
> I would argue in the case of "cursor with hold" this should = have been in the original protocol.
> This is not an added feature this just enables an existing feature in = the server. This is not unlike widening the cancel key.
> Something like encryption would be a feature that I could see using th= e extension mechanism

I agree that encryption is a better fit for the extension mechanism.
But I don't really agree that this isn't a new feature. Exposing existing functionality in new ways counts as a new feature in my book.

>> Having said that, I share Robert's distaste for "silent&q= uot; protocol
>> bumps that change the behavior without any negotiation.
>
> My understanding reading his message he was in favour of it

Well, my feelings are mixed on that point, honestly. If the server
needs to know whether the client supports something, you pretty much
have to have a protocol negotiation of some kind, whether that's a
version bump or an extension. Otherwise, the server simply has no way
to find out what the client supports. In the opposite direction, it's more fuzzy: the client can see the server version number, and so can
draw some conclusions on that basis. We have used this for protocol
changes in the past. However, something like changing the cancel key
or adding cursor with hold affects a lot more clients than adding
CopyBoth that is only triggered by a very specific command in a
special mode. And it's not that theoretically appealing to conflate
the *protocol* version number with the *server* version number.
Sometimes things that are not theoretically appealing are nonetheless
pragmatically appealing. But it is not really clear to me whether this
is one of those cases, and it sounds like Tom and Jacob think it
isn't. I could probably be persuaded either way on the best thing to do here in a vacuum, but I'm strongly disinclined to argue against two<= br> committers who have a firm position on the topic already.

I think what I like least about this proposal is the feeling that
we're about to embark on a long slippery slope of changing the
protocol a little bit in every new PG version. The cancel key thing is
a small change, look here's another. If we just keep doing that, we'= ;ll
end up with either a lot of minor version bumps or a lot of
extensions. I don't foresee a good outcome either way. This is a
widely used, widely adopted protocol. The idea that we can just start
tweaking it a little bit every year and have nothing bad happened
seems wild, regardless of how we do the tweaking.=C2=A0
This leaves us with an all or nothing solution, which practica= lly means we do nothing, since we have to wait until we have a sufficient b= acklog of=C2=A0
changes or features to change the protocol. I see= that as untenable, unless you are now advocating for using extensions for = everything ?

Dave
--000000000000864439064871fe97--