[PATCH] Honor PG_TEST_NOCLEAN for tempdirs

Jacob Champion <jchampion@timescale.com>

From: Jacob Champion <jchampion@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-26T23:55:47Z
Lists: pgsql-hackers

Attachments

Hello,

I was running the test_pg_dump extension suite, and I got annoyed that
I couldn't keep it from deleting its dump artifacts after a successful
run. Here's a patch to make use of PG_TEST_NOCLEAN (which currently
covers the test cluster's base directory) with the Test::Utils
tempdirs too.

(Looks like this idea was also discussed last year [1]; let me know if
I missed any more recent suggestions.)

Thanks,
--Jacob

[1] https://www.postgresql.org/message-id/YyPd9unV14SX2bLF@paquier.xyz

Commits

  1. Make PG_TEST_NOCLEAN work for temporary directories in TAP tests