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 1vTTBd-002U2r-1M for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Dec 2025 23:01:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vTTBc-001SjN-0K for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Dec 2025 23:01:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vTTBb-001SjF-2Q for pgsql-hackers@lists.postgresql.org; Wed, 10 Dec 2025 23:01:32 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vTTBZ-0003gH-3A for pgsql-hackers@lists.postgresql.org; Wed, 10 Dec 2025 23:01:32 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-37b935df7bfso3045831fa.2 for ; Wed, 10 Dec 2025 15:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1765407687; x=1766012487; 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=6dRdEm0zuahOln5ViiXRb+8uyZhQEY0Od4YBjWHuSuA=; b=Rwb2SebCgNaKe9Gp8iRUXaLsJO0sJvqXPfR1Di47GK5awuBSWgMd6GXlBJno9wfoG8 leewTz4D9Q0GxYDaUZRyz+QxAAEFWp+rFPSy37Uc26u+liLOejsHnv8blqHe9HToMcEe /XikzFgYuAQF3vc/oXynSgSDGJJn9Zjxn7FbY+WhMguUVbSEETmPKM7VNDRwP96uEbYr iD565IwvCUnkQNaOwvIdPyBGmzq19tFNZVPTNg0i9An8CfCS9kxD+wmKFP93yhb45xsr az13HhZpNC4hMJRPvHM9N5tSk3SBS/QfDSLfoMMFbXAsYMx7vEty3I02aesRxHHH+yQG XmFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765407687; x=1766012487; 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=6dRdEm0zuahOln5ViiXRb+8uyZhQEY0Od4YBjWHuSuA=; b=o5Lm/BBBHiOtTjkjMmq5ElncVEf/7PBnygj85ND26Xjf1AhRyOa2vA7lWh7F/jdKq/ lvQiq5GIWfY3x3gesJdfUXZl6L9q4AEQd+UM95Nb8L4J8vs/L1j/SItRPn3AFXLIlkCN i0vN+nGw4zugpeQeCWayn7iQpuMN4Tk2EdWKR+C19PI9KuO0nXl7JKup/tgUmxhr+FhS 0V7fploFIhDNPtKyA97M0PCN3eOHPQnX1DUCcb7BJB4sEy5PVj02zEW69+lKhE+kpMc8 y975M44llseOFUavlhdA5q08/EyVz4YNKYc+c/fJRJkFcBSb0yOXFVrheQOxAE70XTNc DiGQ== X-Forwarded-Encrypted: i=1; AJvYcCU+arME4ij5rz4XG5WMYjk/C2DIc5PM7rQBsAnLvkZ2vOfEBW4CToLOhVsoTZgviXyRrQaTD331LOIfy6ga@lists.postgresql.org X-Gm-Message-State: AOJu0YyV2kTOObBRKAObFhq+/CaUuj/7Ut9e+fTQ0QIEQofzMqdCZZG3 BZ2cjMR7FUFlyaLOljjmrPGbT5iRvvLiOWaGBP7eLlG8WYnjwU8Hp3L8P/wXWrE8tQeC4N8q+NC iY1mOwOxvaxxuN0+03hu5DdApBy1ZFckShmOunnTZ+w== X-Gm-Gg: AY/fxX6O0KmRZ0WB6yNsDhDTslYvjt0ZKRzDDJw/pA1Ud8ifL/3FTMIffud8Hgkw7/n 6xMLO4jKvbBSuhkdD0odqKVvR/3pGYVqH4VMMXpSmP3igvvjOjsJnHeh1jR8f/fe/iOrEWe8CWk RLXCjIQA5arWkimF5k+RS1EhK0gc2+TYnzHN3nYZg9V6tyDNImEQhMiJis2C4BQjLcSBXrYHWcY C+CYxnXf1XsT0I+nltKHnc/k5nKLFNylbygVwiepsWUGUf6n9h+XR94hAC4F5+5kz7aZWvc X-Google-Smtp-Source: AGHT+IEgN3aBux8zNI1kFDBnmCm5rvtGCXV9sYvQCn0xWjtTeXqx3+TpIctGQ3wJDsA89q+QDo7U7Clkrw04L60opg0= X-Received: by 2002:a05:651c:551:b0:37b:a821:8ebf with SMTP id 38308e7fff4ca-37fb21089afmr11690111fa.32.1765407687034; Wed, 10 Dec 2025 15:01:27 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jelte Fennema-Nio Date: Thu, 11 Dec 2025 00:01:15 +0100 X-Gm-Features: AQt7F2pr-BHP8pECsmKcdS_fHBpHJ-IzWjHFjTLbl2Kky2Q55Voqxy0zlkgAc-k Message-ID: Subject: Re: Proposal to allow setting cursor options on Portals To: Jacob Champion Cc: Dave Cramer , PostgreSQL Hackers , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 10 Dec 2025 at 18:41, Jacob Champion wrote: > I think it'd be helpful for proposals to describe why a minor version > bump was chosen over a protocol extension parameter (or vice versa), > so that we can begin to develop some consensus. Agreed. > With the > minor-version strategy, if we added new bits in 3.6, clients who just > wanted those new bits would then have to implement support for every > feature in versions 3.4, 3.5, and 3.6 just to improve that one use > case, and that incentive mismatch leads to more ossification IMO. I think in this optional bitmap field case, there's no work for the client to "implement" it. It can simply request 3.3, but not send the bitmap field. Similarly for my proposed GoAway message, a client can simply ignore that message completely when it receives it. If we keep the features that are bundled with a protocol version bump of the kind where a client, either has to do nothing to implement it, or at worst has to ignore the contents of a new message/field. Then implementing support becomes so trivial for clients that I don't think it'd be a hurdle for client authors to implement support for 3.3, 3.4, 3.5 and if they only wanted a feature from the 3.6 protocol.^1 I'll call these things "no-op implementations" from now on. > I've talked about it face-to-face with people, but to go on the public > record: I don't think this is a wise use of a minor version upgrade > strategy. I prefer protocol architectures that introduce separate > extensions first, then periodically bundle the critical and > highly-used extensions into a new minor version once they're sure that > _everyone_ should support those things. I think we disagree on this. I think the downside of using protocol extensions for everything is that we then end up with N*N different combinations of features in the wild that servers and clients need to deal with. We have to start to define what happens when features interact, but either of them is not enabled. With incrementing versions you don't have that problem, which results in simpler logic in the spec, servers and clients. Finally, because we don't have any protocol extensions yet. All clients still need to build infrastructure for them, including libpq. So I'd argue that if we make such "no-op implementation" features use protocol extensions, then it'd be more work for everyone. > I know that 3.2 didn't do that. My view of 3.2 is that it was a big > compromise to get some things unstuck, so overall I'm glad we have it > -- but now that we have it, I'd rather that 3.next be more > intentional. > Plus I think it's unwise to introduce a 3.3 before we're > confident that 3.2 can be widely deployed, and I'm trying to put > effort into the latter for 19, so that I'm not just sitting here > gatekeeping. I'm not sure what you mean with this. People use libpq18 and PG18, and I've heard no complaints about protocol problems. So I think it was a success. Do you mean widely deployed by default? Why exactly does that matter for 3.3? Anything that stands default deployment in the way for 3.2, will continue to stand default deployment in the way for 3.3. Personally, if we flip the default in e.g. 5 years from now. I'd much rather have it be flipped to a very nice 3.6 protocol, than still only having the single new feature that was added in 3.2. > IETF has a bunch of related case studies [1,2,3] that might be useful > reading, even if we decide that their experience differs heavily from > ours. I gave them a skim and they seem like a good read (which I'll do later). But I'm not sure part of them you thought was actionable for the discussion about version bumps vs protocol extensions. (I did see useful stuff for the grease thread, but that seems better to discuss there) ^1: You and I only talked about clients above, but obviously there's also proxies and other servers that implement the protocol to consider. If a feature that is "no-op implementation" on the client is a complicated implementation on the proxy/server then maybe a protocol extension is indeed the better choice. I think for GoAway it's trivial to "no-op implement" too on the proxy/server. For this cursor option proposal it's less clear cut imo. Proxies can probably simply forward the message to the server, although maybe PgBouncer would want to throw an error when a client uses a hold cursor (but it also doesn't do that for SQL level hold cursors, so that seems like an optional enhancement). Other servers might not even support hold cursors, but then they could simply throw a clear error (like pgbouncer would do). If throwing an error is an acceptable server implementation, then I think a "no-op implementation" is again trivial.