Re: Test to dump and restore objects left behind by regression
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, vignesh C <vignesh21@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-28T14:11:15Z
Lists: pgsql-hackers
Attachments
- dump_roundtrip_exclude (text/plain)
On 2025-Mar-28, Ashutosh Bapat wrote: > However, it's a very painful process to come up with the schedule and > more painful and error prone to maintain it. It could take many days > to come up with the right schedule which can become inaccurate the > moment next SQL file is added OR an existing file is modified to > add/drop "interesting" objects. Hmm, I didn't mean that we'd maintain a separate schedule. I meant that we'd take the existing schedule, then apply some Perl magic to it that grep-outs the tests that we know to contribute nothing, and generate a new schedule file dynamically. We don't need to maintain a separate schedule file. You're right that if an existing uninteresting test is modified to create interesting objects, we'd lose coverage of those objects. That seems a much smaller problem to me. So it's just a matter of doing some Perl map/grep to generate a new schedule file using the attached exclusion file. (For what it's worth, what I did to try to determine which tests to include, rather than scan each file manually, is to run pg_regress with "test_setup thetest tablespace", then dump the regression database, and see if anything is there that's not in the dump when I just with just "test_setup tablespace". I didn't carry the experiment to completion though.) For the future, we could annotate each test as you said, either by adding a marker on the test file itself, or by adding something next to its name in the schedule file, so the schedule file could look like: test: plancache(dump_ignore) limit(stream_ignore) plpgsql copy2 temp(stream_ignore,dump_ignore) domain rangefuncs(stream_ignore) prepare conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml ... and so on. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
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