pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add filtering capability for cross-version pg_upgrade tests
Date: Tue, 04 Oct 2022 01:17:13 +0000
Message-ID: <E1ofWYb-000nE7-91@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1ofWYb-000nE7-91@gemulon.postgresql.org>
Permalink:  ../E1ofWYb-000nE7-91@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ofWYb-000nE7-91@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Add filtering capability for cross-version pg_upgrade tests
  In-Reply-To: <E1ofWYb-000nE7-91@gemulon.postgresql.org>
  References: <E1ofWYb-000nE7-91@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox