Re: pgsql: Drop unnamed portal immediately after execution to completion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Drop unnamed portal immediately after execution to completion
Date: 2025-11-10 21:28:02
Message-ID: 1982325.1762810082@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Nov 5, 2025 at 12:43 AM Michael Paquier <michael(at)paquier(dot)xyz> 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-11-10 21:53:07 pgsql: Stamp 18.1.
Previous Message Robert Haas 2025-11-10 21:13:24 Re: pgsql: Drop unnamed portal immediately after execution to completion

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-11-10 21:37:10 Re: Support allocating memory for large strings
Previous Message Nathan Bossart 2025-11-10 21:19:23 Re: vacuumdb: add --dry-run