aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2021-01-14 14:37:01 +0900
committerFujii Masao <fujii@postgresql.org>2021-01-14 23:56:45 +0900
commit8523a0971ba6490919c8e04bc7f7229aa38c789b (patch)
treede05811ad4a70a430c745694c1ec849d2645ca94
parent94f52929a0c4e92c271c5a03bae782ddb0b086bd (diff)
downloadpostgresql-8523a0971ba6490919c8e04bc7f7229aa38c789b.tar.gz
postgresql-8523a0971ba6490919c8e04bc7f7229aa38c789b.zip
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//PsenxcC50jDzX@paquier.xyz
-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 edadab790f3..91a63f4e58f 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 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