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: Daniel Gustafsson <daniel@yesql.se>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2025-02-05T06:28:04Z
Lists: pgsql-hackers
On Mon, Jan 27, 2025 at 03:04:55PM +0530, Ashutosh Bapat wrote:
> PFA patch with rebased on the latest HEAD and conflicts fixed.

Thanks for the new patch.

Hmm.  I was reading through the patch and there is something that
clearly stands out IMO: the new compare_dumps().  It is in Utils.pm,
and it acts as a wrapper of `diff` with its formalized output format.
It is not really about dumps, but about file comparisons.  This should
be renamed compare_files(), with internals adjusted as such, and
reused in all the existing tests.  Good idea to use that in
027_stream_regress.pl, actually.  I'll go extract that first, to
reduce the presence of `diff` in the whole set of TAP tests.

AdjustDump.pm looks like a fine concept as it stands.  I still need to
think more about it.  It feels like we don't have the most optimal 
interface, though, but perhaps that will be clearer once
compare_dumps() is moved out of the way.
--
Michael

Commits

  1. Hide expensive pg_upgrade test behind PG_TEST_EXTRA

  2. Set log_statement=none in t/002_pg_upgrade.pl

  3. 002_pg_upgrade.pl: Move pg_dump test code for better stability

  4. 002_pg_upgrade.pl: rename some variables for clarity

  5. Verify roundtrip dump/restore of regression database

  6. Refactor TAP test code for file comparisons into new routine in Utils.pm

  7. Virtual generated columns

  8. Put generated_stored test objects in a schema

  9. Introduce "builtin" collation provider.

  10. Revert "Improve compression and storage support with inheritance"