Re: pgsql: Drop unnamed portal immediately after execution to completion - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pgsql: Drop unnamed portal immediately after execution to completion
Date
Msg-id aRbGaQTisuKMREuS@paquier.xyz
Whole thread Raw
In response to Re: pgsql: Drop unnamed portal immediately after execution to completion  (Sami Imseih <samimseih@gmail.com>)
Responses Re: pgsql: Drop unnamed portal immediately after execution to completion
List pgsql-hackers
On Thu, Nov 13, 2025 at 04:02:24PM -0600, Sami Imseih wrote:
> I am not sure I like this idea as-is, because besides that fact
> that it's still a wire level change, it's not safe at all to
> re-enter exec_execute_message after you just cleaned the
> portal but did not drop it.

This will come at the cost of tracking a new state in the backend
where the portal would still live with the executor state gone, I
don't like much my own plan D and the road where this leads at the
end.

> That is probably the best idea now.

I have just done a revert of 1fd981f05369 now, let's continue the
discussions.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Extended Statistics set/restore/clear functions.
Next
From: Masahiko Sawada
Date:
Subject: Re: Issue with logical replication slot during switchover