Re: Test to dump and restore objects left behind by regression
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2024-07-05T05:29:26Z
Lists: pgsql-hackers
On Fri, Jun 28, 2024 at 06:00:07PM +0530, Ashutosh Bapat wrote: > Here's a description of patches and some notes > 0001 > ------- > 1. Per your suggestion the logic to handle dump output differences is > externalized in PostgreSQL::Test::AdjustDump. Instead of eliminating those > differences altogether from both the dump outputs, the corresponding DDL in > the original dump output is adjusted to look like that from the restored > database. Thus we retain full knowledge of what differences to expect. > 2. I have changed the name filter_dump to filter_dump_for_upgrade so as to > differentiate between two adjustments 1. for upgrade and 2. for > dump/restore. Ideally the name should have been adjust_dump_for_ugprade() . > It's more of an adjustment than filtering as indicated by the function it > calls. But I haven't changed that. The new function to adjust dumps for > dump and restore tests is named adjust_dump_for_restore() however. > 3. As suggested by Daniel upthread, the test for dump and restore happens > before upgrade which might change the old cluster thus changing the state > of objects left behind by regression. The test is not executed if > regression is not used to create the old cluster. > 4. The code to compare two dumps and report differences if any is moved to > its own function compare_dumps() which is used for both upgrade and > dump/restore tests. > The test uses the custom dump format for dumping and restoring the > database. At quick glance, that seems to be going in the right direction. Note that you have forgotten install and uninstall rules for the new .pm file. 0002 increases more the runtime of a test that's already one of the longest ones in the tree is not really appealing, I am afraid. -- Michael
Commits
-
Hide expensive pg_upgrade test behind PG_TEST_EXTRA
- d185161e4739 18.0 landed
- 37fc1803cc12 19 (unreleased) landed
-
Set log_statement=none in t/002_pg_upgrade.pl
- 64fba9c61787 18.0 landed
-
002_pg_upgrade.pl: Move pg_dump test code for better stability
- 8806e4e8deb1 18.0 landed
-
002_pg_upgrade.pl: rename some variables for clarity
- abe56227b2e2 18.0 landed
-
Verify roundtrip dump/restore of regression database
- 172259afb563 18.0 landed
-
Refactor TAP test code for file comparisons into new routine in Utils.pm
- 169208092f5c 18.0 landed
-
Virtual generated columns
- 83ea6c54025b 18.0 cited
-
Put generated_stored test objects in a schema
- 894be11adfa6 18.0 cited
-
Introduce "builtin" collation provider.
- 2d819a08a1cb 17.0 cited
-
Revert "Improve compression and storage support with inheritance"
- 74563f6b9021 17.0 cited