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 1vIZQq-005jNK-1h for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Nov 2025 21:28:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vIZQm-002c0B-2u for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Nov 2025 21:28:08 +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 1vIZQm-002c02-1v for pgsql-hackers@lists.postgresql.org; Mon, 10 Nov 2025 21:28:08 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vIZQk-0072xK-18 for pgsql-hackers@lists.postgresql.org; Mon, 10 Nov 2025 21:28:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5AALS2n31982331; Mon, 10 Nov 2025 16:28:02 -0500 From: Tom Lane To: Robert Haas cc: Michael Paquier , PostgreSQL Hackers Subject: Re: pgsql: Drop unnamed portal immediately after execution to completion In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Mon, 10 Nov 2025 16:13:24 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1982322.1762810082.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 10 Nov 2025 16:28:02 -0500 Message-ID: <1982325.1762810082@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Wed, Nov 5, 2025 at 12:43=E2=80=AFAM Michael Paquier wrote: >> Drop unnamed portal immediately after execution to completion > This patch doesn't look well-considered to me. One problem is that > it's a wire protocol change to fix a minor logging anomaly, which > seems disproportionate. Another problem is that the new portal-drop > behavior is conditional on whether XACT_FLAGS_NEEDIMMEDIATECOMMIT gets > set, which seems unprincipled. In addition to those points, I am not > entirely certain that the "here is no need for it beyond this point" > comment is correct. I mean, I think it will normally be true, but what > if the client wants to send a Describe message after-the-fact, or an > additional Execute message that will presumably return zero rows? Yeah, the whole idea of changing the wire-level behavior to fix this has been making me itch: I don't believe for a moment that it won't cause compatibility problems. I do not have a better proposal for fixing the problem though. regards, tom lane