From 4258ed1bcad537418c4c3f4ba0e3712ec515e09e Mon Sep 17 00:00:00 2001 From: Ashutosh Bapat Date: Tue, 25 Feb 2025 11:42:51 +0530 Subject: [PATCH 3/3] Do not dump statistics in the file dumped for comparison As reported at [1], the dumped and restored statistics may differ if there's a primary key on the table. Hence do not dump the statistics to avoid differences in the dump output from the original and restored database. [1] https://www.postgresql.org/message-id/CAExHW5vf9D+8-a5_BEX3y=2y_xY9hiCxV1=C+FnxDvfprWvkng@mail.gmail.com Ashutosh Bapat --- src/bin/pg_upgrade/t/002_pg_upgrade.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl index e6d8ac9a757..8924cf8344a 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -644,7 +644,7 @@ sub get_dump_for_comparison $node->command_ok( [ - 'pg_dump', '--no-sync', '-d', $node->connstr($db), '-f', + 'pg_dump', '--no-sync', '--no-statistics', '-d', $node->connstr($db), '-f', $dumpfile ], 'dump for comparison succeeded'); -- 2.34.1