summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas2022-08-04 19:17:14 +0000
committerRobert Haas2022-08-04 19:26:07 +0000
commit87e22f675fd81ba1d96b0b9a34bbf26d5ec532d5 (patch)
treec3cc82dd84835ba28f7601f8c490ea87f6916883
parentd59383924c580a77a2346d9b1284c8589b3d43e2 (diff)
Revert recent changes to 002_pg_upgrade.pl.
The test is proving to be unreliable in the buildfarm, and we neither agree on how best to fix it nor have time to do so before the upcoming release. So for now, put things back to the way they were before commit d498e052b4b84ae21b3b68d5b3fda6ead65d1d4d. Discussion: http://postgr.es/m/[email protected]
-rw-r--r--src/bin/pg_upgrade/t/002_pg_upgrade.pl46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index 4cbc75644c..2f9b13bf0a 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -208,25 +208,6 @@ if (defined($ENV{oldinstall}))
}
}
-$oldnode->safe_psql("regression", "VACUUM FULL pg_largeobject;");
-
-# Record the relfrozenxid and relminmxid horizons from the old server.
-my $horizon_query = <<EOM;
-SELECT
- c.oid::regclass, c.relfrozenxid, c.relminmxid
-FROM
- pg_class c, pg_namespace n
-WHERE
- c.relnamespace = n.oid AND
- ((n.nspname !~ '^pg_temp_' AND n.nspname !~ '^pg_toast_temp_' AND
- n.nspname NOT IN ('pg_catalog', 'information_schema', 'binary_upgrade',
- 'pg_toast'))
- OR (n.nspname = 'pg_catalog' AND relname IN ('pg_largeobject')))
-ORDER BY c.oid::regclass::text
-EOM
-$horizon_query =~ s/\s+/ /g; # run it together on one line
-my $horizon1 = $oldnode->safe_psql('regression', $horizon_query);
-
# In a VPATH build, we'll be started in the source directory, but we want
# to run pg_upgrade in the build directory so that any files generated finish
# in it, like delete_old_cluster.{sh,bat}.
@@ -311,9 +292,6 @@ $newnode->command_ok(
],
'dump after running pg_upgrade');
-# And record the horizons from the upgraded cluster as well.
-my $horizon2 = $newnode->safe_psql('regression', $horizon_query);
-
# Compare the two dumps, there should be no differences.
my $compare_res = compare("$tempdir/dump1.sql", "$tempdir/dump2.sql");
is($compare_res, 0, 'old and new dumps match after pg_upgrade');
@@ -331,28 +309,4 @@ if ($compare_res != 0)
print "=== EOF ===\n";
}
-# Compare the horizons, there should be no differences.
-my $horizons_ok = $horizon1 eq $horizon2;
-ok($horizons_ok, 'old and new horizons match after pg_upgrade');
-
-# Provide more context if the horizons do not match.
-if (! $horizons_ok)
-{
- # output is long, so use diff to compare
- open my $fh, ">", "$tempdir/horizon1.txt" or die "could not open file: $!";
- print $fh $horizon1;
- close $fh;
- open $fh, ">", "$tempdir/horizon2.txt" or die "could not open file: $!";
- print $fh $horizon2;
- my ($stdout, $stderr) =
- run_command([ 'diff', "$tempdir/horizon1.txt", "$tempdir/horizon2.txt" ]);
- close $fh;
- print "=== diff of $tempdir/horizon1.txt and $tempdir/horizon2.txt\n";
- print "=== stdout ===\n";
- print $stdout;
- print "=== stderr ===\n";
- print $stderr;
- print "=== EOF ===\n";
-}
-
done_testing();