Re: [BUG] temporary file usage report with extended protocol and unnamed portals

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Mircea Cadariu <cadariu.mircea@gmail.com>
Cc: Sami Imseih <samimseih@gmail.com>, Guillaume Lelarge <guillaume.lelarge@dalibo.com>, Frédéric Yhuel <frederic.yhuel@dalibo.com>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Benoit Lobréau <benoit.lobreau@dalibo.com>, Pierrick Chovelon <pierrick.chovelon@dalibo.com>
Date: 2025-10-27T23:30:51Z
Lists: pgsql-hackers
On Fri, Oct 24, 2025 at 12:34:56PM +0100, Mircea Cadariu wrote:
> So far so good!

Yes, the buildfarm has not been complaining.

> About the main issue, seems to me the consensus is that dropping unnamed
> portals more aggressively is the way to go?

At the cost of one extra hash table lookup, that unlikely does not
matter for performance anyway.  I guess so.

It's not something that can be backpatched.  We need to make sure that
the documentation about an unnamed portal drop happening on a
follow-up BIND query is fixed.  If somebody would like to send a
refresh patch, including for how the tests change, that would be
welcome here.
--
Michael

Commits

  1. Drop unnamed portal immediately after execution to completion

  2. Override log_error_verbosity to "default" in test 009_log_temp_files

  3. Add tests for logging of temporary file removal and statement