Re: [BUG] temporary file usage report with extended protocol and unnamed portals
Frédéric Yhuel <frederic.yhuel@dalibo.com>
From: Frédéric Yhuel <frederic.yhuel@dalibo.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Benoit Lobréau <benoit.lobreau@dalibo.com>, Guillaume Lelarge <guillaume.lelarge@dalibo.com>, Pierrick Chovelon <pierrick.chovelon@dalibo.com>
Date: 2025-04-23T07:41:58Z
Lists: pgsql-hackers
On 4/22/25 19:37, Sami Imseih wrote: > the patch relies on looking up queryDesc->sourceText inside DropPortal, > which Tom raised concerns about earlier in the thread [0] Yes, I think I had misunderstood what Tom said. Thank you for pointing that out. However, is it really unsafe? In exec_bind_message, the portal's query string comes from a duplicate of the original string (see CreateCachedPlan). So we are safe in this case. In exec_simple_query, the portal is dropped towards the end of this function, so we are safe here too. Am I missing something?
Commits
-
Drop unnamed portal immediately after execution to completion
- 1fd981f05369 19 (unreleased) landed
-
Override log_error_verbosity to "default" in test 009_log_temp_files
- 02c171f63fca 19 (unreleased) landed
-
Add tests for logging of temporary file removal and statement
- 76bba033128a 19 (unreleased) landed