diff options
| author | Álvaro Herrera | 2024-11-13 10:06:44 +0000 |
|---|---|---|
| committer | Álvaro Herrera | 2024-11-13 10:06:44 +0000 |
| commit | 38c18710b37a2d0e343a8d6b6333cff31498459b (patch) | |
| tree | e8922ab8952711ecadf60b922baa32eb5cff1a64 /src | |
| parent | f05b5e6346802d58f23d2ba8370091eab7aa5f63 (diff) | |
Fix pg_upgrade's cross-version tests when old < 18
Because in the 18 cycle we turned checksums on by default with commit
04bec894a04c, and pg_upgrade fails if the setting doesn't match in old
and new clusters, the built-in cross-version pg_upgrade test is failing
if the old version is older than 18. Fix the script so that it creates
the old cluster with checksums enabled (-k) in cross-version scenarios.
This went unnoticed because the buildfarm doesn't use the same test code
for cross-version testing.
Reviewed-by: Peter Eisentraut <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/pg_upgrade/t/002_pg_upgrade.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl index 9b51f9e666a..3b9cb21cbd5 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -180,6 +180,10 @@ if ($oldnode->pg_version >= 15) } } +# Since checksums are now enabled by default, and weren't before 18, +# pass '-k' to initdb on old versions so that upgrades work. +push @initdb_params, '-k' if $oldnode->pg_version < 18; + $node_params{extra} = \@initdb_params; $oldnode->init(%node_params); $oldnode->start; |
