]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Stabilize timeline switch regression test.
authorFujii Masao <fujii@postgresql.org>
Thu, 14 Jan 2021 05:37:01 +0000 (14:37 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 14 Jan 2021 14:56:45 +0000 (23:56 +0900)
Commit fef5b47f6b added the regression test to check whether a standby is
able to follow a primary on a newer timeline when WAL archiving is enabled.
But the buildfarm member florican reported that this test failed because
the requested WAL segment was removed and replication failed. This is a
timing issue. Since neither replication slot is used nor wal_keep_size is set
in the test, checkpoint could remove the WAL segment that's still necessary
for replication.

This commit stabilizes the test by setting wal_keep_size.

Back-patch to v13 where the regression test that this commit stabilizes
was added.

Author: Fujii Masao
Discussion: https://postgr.es/m/X//PsenxcC50jDzX@paquier.xyz

src/test/recovery/t/004_timeline_switch.pl

index edadab790f30b9c1a4e343f9ea0cd47075f44b34..91a63f4e58fe58cc75bc76585fcc925a62b907b1 100644 (file)
@@ -75,6 +75,10 @@ is($result, qq(2000), 'check content of standby 2');
 # Initialize master node
 my $node_master_2 = get_new_node('master_2');
 $node_master_2->init(allows_streaming => 1, has_archiving => 1);
+$node_master_2->append_conf(
+       'postgresql.conf', qq(
+wal_keep_size = 512MB
+));
 $node_master_2->start;
 
 # Take backup