summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao2026-09-08 07:48:29 +0000
committerFujii Masao2026-09-08 07:49:27 +0000
commit66fca522c3fdb6e8c0559fd5ee44893f0732fbb8 (patch)
treed7915fff4eacc0cd0a5c44585f3fa795bca1e236
parent071fb9af2dc54b218ff29bc21187cd70698feb3d (diff)
Stabilize 026_overwrite_contrecord test
On slow machines, this test can take long enough to generate WAL that a time-based checkpoint occurs before the primary is stopped. If the checkpoint record is written to the tail WAL segment that the test later removes, a standby initialized from the resulting backup tries to read the missing checkpoint record and fails with a PANIC during startup. This caused the test to fail on buildfarm member skink. Fix this by setting checkpoint_timeout high enough to prevent unrelated checkpoints during the test. This follows the approach used by other recovery tests, such as 043_no_contrecord_switch.pl, that depend on a specific WAL layout. Backpatch to all supported versions. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CAHGQGwFajfjKhvNSTkTcE-wFn30p_A0_i1cvk-Q=FJhDr_5cXA@mail.gmail.com Discussion: https://postgr.es/m/9ffdb19a-7a89-424e-925a-dd981c37f0ba@gmail.com Backpatch-through: 14
-rw-r--r--src/test/recovery/t/026_overwrite_contrecord.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/recovery/t/026_overwrite_contrecord.pl b/src/test/recovery/t/026_overwrite_contrecord.pl
index fad1811ca8d..ddf1fa223df 100644
--- a/src/test/recovery/t/026_overwrite_contrecord.pl
+++ b/src/test/recovery/t/026_overwrite_contrecord.pl
@@ -17,10 +17,13 @@ use Test::More;
my $node = PostgreSQL::Test::Cluster->new('primary');
$node->init(allows_streaming => 1);
-# We need these settings for stability of WAL behavior.
+# We need these settings for stability of WAL behavior. checkpoint_timeout
+# avoids noise from checkpoint activity, and autovacuum is disabled to avoid
+# any WAL activity generated by it.
$node->append_conf(
'postgresql.conf', qq(
autovacuum = off
+checkpoint_timeout = '30min'
wal_keep_size = 1GB
));
$node->start;