pgsql: Add filtering capability for cross-version pg_upgrade tests

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add filtering capability for cross-version pg_upgrade tests
Date: 2022-10-04 01:17:13
Message-ID: E1ofWYb-000nE7-91@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add filtering capability for cross-version pg_upgrade tests

This commit expands the TAP tests of pg_upgrade when running these with
different major versions for the "old" cluster (to-be-upgraded) and the
"new" cluster (upgraded-to), by backporting some of the buildfarm
facilities directory into the script:
- Remove comments from the dump files, avoiding version-dependent
information.
- Remove empty lines from the dump files.
- Use --extra-float-digits=0 in the pg_dump command, when using an "old"
cluster with version equal to or lower than v11.
- Use --wal-segsize and --allow-group-access in initdb only when the
"old" cluster is equal to or higher than v11.

This allows the tests to pass down to v14 with the main regression test
suite, while v9.5~13 still generate some diffs, but these are minimal
compared to what happened before this commit. Much more could be done,
especially around dump differences with function and procedures (these
can also be avoided with direct manipulation of the dumps loaded, for
example, in a way similar to the buildfarm), but at least the basics are
in place now.

Reviewed-by: Justin Pryzby, Anton A. Melnikov
Discussion: https://postgr.es/m/Yox1ME99GhAemMq1@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/62be9e4cdc1d59dd6c9c268c7419d7d4f1016124

Modified Files
--------------
src/bin/pg_upgrade/t/002_pg_upgrade.pl | 103 ++++++++++++++++++++++-----------
1 file changed, 70 insertions(+), 33 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-10-04 04:17:41 pgsql: Cleanup useless assignments and checks
Previous Message Andres Freund 2022-10-03 22:01:29 pgsql: meson: llvm: Use llvm-config's --cxxflags when building llvmjit