I have just noticed that since this patch was committed as 04bec894a04c,
pg_upgrade's "make check" action is unusable when given the
"olddump/oldinstall" options.  We now need to inject '-k' to the initdb
line for old servers, and we don't, so all upgrade tests fail.  I think
this patch should be enough to fix it.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"No tengo por qué estar de acuerdo con lo que pienso"
                             (Carlos Caszeli)
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index 9b51f9e666..27aa27bc8e 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;

Reply via email to