pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Create common infrastructure for cross-version upgrade testing.
Date: Tue, 17 Jan 2023 01:37:09 +0000
Message-ID: <E1pHauS-0043Na-Vr@gemulon.postgresql.org> (raw)

Create common infrastructure for cross-version upgrade testing.

To test pg_upgrade across major PG versions, we have to be able to
modify or drop any old objects with no-longer-supported properties,
and we have to be able to deal with cosmetic changes in pg_dump output.
Up to now, the buildfarm and pg_upgrade's own test infrastructure had
separate implementations of the former, and we had nothing but very
ad-hoc rules for the latter (including an arbitrary threshold on how
many lines of unchecked diff were okay!).  This patch creates a Perl
module that can be shared by both those use-cases, and adds logic
that deals with pg_dump output diffs in a much more tightly defined
fashion.

This largely supersedes previous efforts in commits 0df9641d3,
9814ff550, and 62be9e4cd, which developed a SQL-script-based solution
for the task of dropping old objects.  There was nothing fundamentally
wrong with that work in itself, but it had no basis for solving the
output-formatting problem.  The most plausible way to deal with
formatting is to build a Perl module that can perform editing on the
dump files; and once we commit to that, it makes more sense for the
same module to also embed the knowledge of what has to be done for
dropping old objects.

Back-patch versions of the helper module as far as 9.2, to
support buildfarm animals that still test that far back.
It's also necessary to back-patch PostgreSQL/Version.pm,
because the new code depends on that.  I fixed up pg_upgrade's
002_pg_upgrade.pl in v15, but did not look into back-patching
it further than that.

Tom Lane and Andrew Dunstan

Discussion: https://postgr.es/m/891521.1673657296@sss.pgh.pa.us

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8e7398dce55b1d2a32a31f11179075086d112b66

Modified Files
--------------
src/bin/pg_upgrade/upgrade_adapt.sql           |  91 -----
src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm | 528 +++++++++++++++++++++++++
src/test/perl/PostgreSQL/Version.pm            | 167 ++++++++
3 files changed, 695 insertions(+), 91 deletions(-)



view thread (12+ messages)  latest in thread

Message-ID: <E1pHauS-0043Na-Vr@gemulon.postgresql.org>
Permalink:  ../E1pHauS-0043Na-Vr@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pHauS-0043Na-Vr@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Create common infrastructure for cross-version upgrade testing.
  In-Reply-To: <E1pHauS-0043Na-Vr@gemulon.postgresql.org>
  References: <E1pHauS-0043Na-Vr@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