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 1vgVN3-00ERIs-18 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 21:59:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgVN2-001SnO-1N for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 21:59:12 +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 1vgVMG-001PeG-19 for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 21:58:24 +0000 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgUYA-000h8L-1O for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 21:06:40 +0000 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-5014acad6f2so27091cf.1 for ; Thu, 15 Jan 2026 13:06:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768511196; cv=none; d=google.com; s=arc-20240605; b=dVg5meYYENDqNksSrOgGB1VrocieIZl8+zoTRkMx4TTF6RxMLKhBD6MMB1EOXOoWhk B1e52T0pHQwi3ela2KPY2r8Shiurfq5vHJNPFabn99aSwM1rOucPLsT2dV2ZPrxl1Jyq 4nH53wY2T3h9TzHLWdX1sdVp4k1QxllbufYLDqNaDumgDK5/gTYW2nBUrvmrY3JW8U9K 41GMEoL9Jlsvr90Y92TA0k2eymDF+0ca2/5ysNOEbmbTJw40+Oj+tnuLx0eXlYPr4geR CCySeFxLrUNfklG/mGrhVMAsmrLZ4rHq5OVQHO5I7e5Z6IKLHehMFPRtPn/s+e5S+prg EeKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=igAugUTda0CXLnrqSdk/sVjAJGDkP8taAAdWg9HBufs=; fh=J2M2s8VSivSpXM0Q6WFX9yuqWeIl4/5SWkD9h6HhqJE=; b=RyYUUWvnXMjaY39qg8VB2QGxqjLlUB9jvACA2qZpm6g9dgBMe5uDJoW5vEH/W/gpec AlyFwJ5/SEz/ZvKqOOi6FqCYI0m8nlURuCmx/o65/Dqoz7v3Bs0fOSGye2B3L0vHa2WA rkwa4oIwQ8iYEZdimEBk0s50Lgl8zaTr0PxpUmo1tsWFLeRkhJxxx1fgvdTJdifOX5gv pSeGhwwqX5V3HiviwxNuBr90FIPawKsU+XbHEB0qRjOizVS4dcs0M9X1fPYzErAyilY9 C0nhv4Bws1Z2nY4fIZwggImgJQLWMtTeWAXVaPdkFJBaKnV1klL0D9UT0zuRm9tVGWSi ZHZg==; 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=google.com; s=20230601; t=1768511196; x=1769115996; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=igAugUTda0CXLnrqSdk/sVjAJGDkP8taAAdWg9HBufs=; b=p9qY2XuA7s3pqCDyXe+JF3FAIYQtfbEQNKDFbfJTvmcfQLeoWNMECpEhRoOy5Z/s1m ytbHbItRHrMQQn+aPZQfIKSeCQPYS9VsgFYqnQ3+id2PWU67stEhpcKpFg3LCc4g520J kTuAtjfEnTMn8ofr9+iytvrpmgBtIvzpTEkAApCpIYe9YS/e9iSkXDlojb7v0h1nqMVi bu5teIVVnmUo73wa+3nhDHKWrYUHNkjKBSxRBepgmVhWJkdQlWM+DpjLS2HqoafyGOf4 /ViONbrp5qKqLg1xhf4N14dou2CCAxXWOoKM4yg4wvNpn7aI2s3Ye4iJv5za6919Y4tC NxnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768511196; x=1769115996; h=content-transfer-encoding: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=igAugUTda0CXLnrqSdk/sVjAJGDkP8taAAdWg9HBufs=; b=tlqhlxBfpE10VPY3fkzphzhcvAj/DOg8oky2okD3CpOhKIm2x4k9we0QxZpm8e3RSP MpZfZbGTPydDSpMpoMc3eEubGJFkpmZ9+L5+bWY7ewZDL0SRNpH5vSc/bu8rY8EK/FG7 ls47ar0clmr8bLmhVnQsIlx6HJ7QF7SwXOcWUva6ncNxVrAafjGOuu/25MxXlrLFNSeP s7ium3pp3E1gJr8RmJ+mvHCkerkATAEwB2zNJ+RpH1quUOM5sN1LaPVSMSTLskSWgrjp p1NrafTlmKpWhnvNAx43GpTBs+582YeVYMaQ8AQwAPYqDrJO/PeZeTx/W4y0laptPE5y u73A== X-Forwarded-Encrypted: i=1; AJvYcCUSeduwLcqFse6xfJMqCU5WhOiCdSPctQe18/eePDLTv/7U2utuJBuKy4XRtBhCIDiEta+496k195zoGQYT@lists.postgresql.org X-Gm-Message-State: AOJu0Yzvljk9MMpm+ySfCWIYJTBdt5lNH8wFf3sUAezen8iCq8TSOJgI b5xVS6Y2sp7pYDZckd/7TNSCkurqgiiuL7xfGpWX0iwr8L1vUeMtNA/YGwuJSqNKR7kjfPqp4JU avrw+AnjBnXIJb59idNIf7xYhFWf8RIxyAPUnTPiF X-Gm-Gg: AY/fxX4I0BNZB9w7HTJDlf7mINGo1AXDgcIw/k8rzSG9MCljtpf/S+f28ZT7tZqreML Hx7J18bgTK5Gq39WSpdn2ePQAb3HLvFXzR/F+28FzUhkuCqXKRG3B36i67iUIJDNCcFK5zU0vYy y8I6xiKW7ScZcGZ1cq3mv6Tzhd/SfQSlqHVXPK+gjhIG3lGl3Zilh157YUH2Omrop0SQxSff1J1 JU7Cf1Thnc44/PIK/Nj6kcRGoEQOzL4mO9awecRTlUdBFSoZJmm+ufJWgQ4PM4PQti5ivl+RTDL 8XkcjSywTYdqz0hX4P42QwR7RIiG X-Received: by 2002:ac8:7dc6:0:b0:4ed:ff79:e678 with SMTP id d75a77b69052e-502a23db782mr2033651cf.18.1768511195761; Thu, 15 Jan 2026 13:06:35 -0800 (PST) MIME-Version: 1.0 References: <2155281.1767900170@sss.pgh.pa.us> <431484.1768433414@sss.pgh.pa.us> In-Reply-To: From: Hannu Krosing Date: Thu, 15 Jan 2026 22:06:23 +0100 X-Gm-Features: AZwV_QhnGMfUU1u50P__NGbIL-M6V0H_mwVff7XXbjO8dEu5IXjWzACzePUkTSs Message-ID: Subject: Re: Proposal to allow setting cursor options on Portals To: Dave Cramer Cc: Robert Haas , Tom Lane , Jelte Fennema-Nio , Jacob Champion , PostgreSQL Hackers , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk First, let me say that I very much support getting this into the wire proto= col. As for ways to extend the protocol, I have been myself working on another patch + extension where one can return extra info in ReadyForQuery message The first things to add are * CommitLSN so we can make use of ability to WAIT FOR LSN on replica and two connection-pooling helpers * a flag telling that there are HOLD CURSORS * a flag telling that there are temp tables This extra feedback is enabled by setting a flag, so no flag -- nothing to confuse the client. The extras themselves are uniform (length, tag, data) so client can ignore any tag they do not recognize. On Thu, Jan 15, 2026 at 8:11=E2=80=AFPM Dave Cramer = wrote: > > > On Thu, 15 Jan 2026 at 14:00, Robert Haas wrote: >> ... >> 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. I think "tweaking ait little bit" and only whhere needed is exactly the right approach, if it can be cleanly isolated. My approach to protocol extension modulation *is* the ability to enable different parts of the protocol individually. For example the protocol extension to allow cursor/portal flags could be implemented this way Client has to set a flag to PROTOCOL_PORTAL_OPTIONS=3Dtrue to tell the server that new protocol messages are coming - If flag setting fails, client will not send the new protocol messages - If flag setting succeeds, then it is ok to send the new messages corresponding to the flag. This way the extra packets are disconnected from protocol version and can be enabled/disabled individually and per connection And it also lets one cleanly backport the change as needed without affecting anything else. > This leaves us with an all or nothing solution, which practically means w= e 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, unle= ss you are now advocating for using extensions for everything ? > > Dave