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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Mircea Cadariu <cadariu.mircea@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Frédéric Yhuel <frederic.yhuel@dalibo.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-16T23:11:52Z
Lists: pgsql-hackers
On Fri, Nov 14, 2025 at 03:10:32PM +0000, Mircea Cadariu wrote:
> What's interesting about the holdable cursors scenario is that as far as I
> can tell the temp files are cleaned up during PersistHoldablePortal instead
> of PortalDrop.

Done this one as e7cde9dad285.
--
Michael

Commits

  1. Add test for temporary file removal and WITH HOLD cursor

  2. Revert "Drop unnamed portal immediately after execution to completion"

  3. Drop unnamed portal immediately after execution to completion