summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao2021-01-14 05:37:01 +0000
committerFujii Masao2021-01-14 14:55:33 +0000
commit424d7a9b277c0da5ec638bf6344cda899a2e544a (patch)
tree9be21967fdf19a00f7f636975968cf815656d70a
parent3f238b882c276a59f5d98224850e5aee2a3fec8c (diff)
Stabilize timeline switch regression test.
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//[email protected]
-rw-r--r--src/test/recovery/t/004_timeline_switch.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/recovery/t/004_timeline_switch.pl b/src/test/recovery/t/004_timeline_switch.pl
index 8dad044db4b..c8dbd8f9df3 100644
--- a/src/test/recovery/t/004_timeline_switch.pl
+++ b/src/test/recovery/t/004_timeline_switch.pl
@@ -75,6 +75,10 @@ is($result, qq(2000), 'check content of standby 2');
# Initialize primary node
my $node_primary_2 = get_new_node('primary_2');
$node_primary_2->init(allows_streaming => 1, has_archiving => 1);
+$node_primary_2->append_conf(
+ 'postgresql.conf', qq(
+wal_keep_size = 512MB
+));
$node_primary_2->start;
# Take backup