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

Mircea Cadariu <cadariu.mircea@gmail.com>

From: Mircea Cadariu <cadariu.mircea@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>
Cc: 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-12T11:14:26Z
Lists: pgsql-hackers

Attachments

Hi,

I understand the point that’s been raised. Would it be an option to 
indeed revert the portal drop in postgres.c, but then append the right 
query in the "temporary file: ..." log line instead? This would work at 
least for me.

Attached is a POC patch (contains a layering violation, hoping it could 
be avoided somehow).

Kind regards,

Mircea Cadariu