pgsql: Add test for temporary file removal and WITH HOLD cursor

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add test for temporary file removal and WITH HOLD cursor
Date: 2025-11-16 23:11:24
Message-ID: E1vKlu0-006xKp-0e@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add test for temporary file removal and WITH HOLD cursor

This new test, added in 009_log_temp_files, checks that the temporary
files created by a WITH HOLD cursor are dropped at the end of the
transaction where the transaction has been created.

The portal's executor is shutdown in PersistHoldablePortal(), after for
example some forced detoast, so as the cursor data can be accessed
without requiring a snapshot.

Author: Mircea Cadariu <cadariu(dot)mircea(at)gmail(dot)com>
Discussion: https://postgr.es/m/0a666d28-9080-4239-90d6-f6345bb43468@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e7cde9dad285acb579b189e82a57fa7b98f23a11

Modified Files
--------------
src/test/modules/test_misc/t/009_log_temp_files.pl | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-11-16 23:11:52 Re: pgsql: Drop unnamed portal immediately after execution to completion
Previous Message Dean Rasheed 2025-11-16 22:17:53 pgsql: Fix Assert failure in EXPLAIN ANALYZE MERGE with a concurrent up