Re: Extracting cross-version-upgrade knowledge from buildfarm client
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-07-19T13:07:56Z
Lists: pgsql-hackers
On 2023-07-19 We 07:05, Alvaro Herrera wrote:
> I just hit a snag testing this. It turns out that the
> PostgreSQL::Version comparison stuff believes that 16beta2 < 16, which
> sounds reasonable. However, because of that, the AdjustUpgrade.pm
> stanza that tries to drop tables public.gtest_normal_child{2} in
> versions earlier than 16 fails, because by 16 these tables are dropped
> in the test itself rather than left to linger, as was the case in
> versions 15 and earlier.
>
> So, if you try to run the pg_upgrade test with a dump created by
> 16beta2, it will fail to drop these tables (because they don't exist)
> and the whole test fails. Why hasn't the buildfarm detected this
> problem? I see that Drongo is happy, but I don't understand why.
> Apparently, the AdjustUpgrade.pm stuff leaves no trace.
The buildfarm module assumes that no adjustments are necessary if the
old and new versions are the same (e.g. HEAD to HEAD). And it never
passes in a version like '16beta2'. It extracts the version number from
the branch name, e.g. REL_16_STABLE => 16.
>
> I can fix this either by using DROP IF EXISTS in that stanza, or by
> making AdjustUpgrade use 'version <= 15'. Any opinions on which to
> prefer?
>
The trouble is this could well break the next time someone puts in a
test like this.
Maybe we need to make AdjustUpgrade just look at the major version,
something like:
$old_version = PostgreSQL::Version->new($old_version->major);
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
Commits
-
Compare only major versions in AdjustUpgrade.pm
- 6061adedf53c 17.0 landed
- 28ce9d51f908 16.0 landed
-
Get rid of the "new" and "old" entries in a view's rangetable.
- 47bb9db75996 16.0 landed
-
Create common infrastructure for cross-version upgrade testing.
- 52585f8f072a 16.0 landed
- f02a75222821 11.19 landed
- ddd89df26b97 10 (unreleased) landed
- bfa3d2790664 9.5 (unreleased) landed
- a2091843f69e 9.2 (unreleased) landed
- 8e7398dce55b 14.7 landed
- 4bcf3521290a 9.4 (unreleased) landed
- 4ad0896bca92 15.2 landed
- 3f0b9df88bb3 13.10 landed
- 3911fd55f53a 9.6 (unreleased) landed
- 2e8bedc3d68c 9.3 (unreleased) landed
- 0e4d38100acb 12.14 landed