aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2024-08-31 14:32:08 +1200
committerThomas Munro <tmunro@postgresql.org>2024-08-31 15:00:21 +1200
commit2015dd5c9024b3be9f712acae7b50dc942e70cda (patch)
treedbbb6695076553624345456e15ba73349309fa76
parentf3a33111108b1d06f2966e50bad50434026ff5c6 (diff)
downloadpostgresql-2015dd5c9024b3be9f712acae7b50dc942e70cda.tar.gz
postgresql-2015dd5c9024b3be9f712acae7b50dc942e70cda.zip
Stabilize 039_end_of_wal test.
The first test was sensitive to the insert LSN after setting up the catalogs, which depended on environmental things like the locales on the OS and usernames. Switch to a new WAL file before the first test, as a simple way to put every computer into the same state. Back-patch to all supported releases. Reported-by: Anton Voloshin <a.voloshin@postgrespro.ru> Reported-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://postgr.es/m/b26aeac2-cb6d-4633-a7ea-945baae83dcf%40postgrespro.ru
-rw-r--r--src/test/recovery/t/039_end_of_wal.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/recovery/t/039_end_of_wal.pl b/src/test/recovery/t/039_end_of_wal.pl
index d2bf062bb23..02f0091a6c5 100644
--- a/src/test/recovery/t/039_end_of_wal.pl
+++ b/src/test/recovery/t/039_end_of_wal.pl
@@ -251,6 +251,12 @@ $WAL_BLOCK_SIZE = get_int_setting($node, 'wal_block_size');
$TLI = $node->safe_psql('postgres',
"SELECT timeline_id FROM pg_control_checkpoint();");
+# Initial LSN may vary across systems due to different catalog contents set up
+# by initdb. Switch to a new WAL file so all systems start out in the same
+# place. The first test depends on trailing zeroes on a page with a valid
+# header.
+$node->safe_psql('postgres', "SELECT pg_switch_wal();");
+
my $end_lsn;
my $prev_lsn;