Skip to content

Commit b66767b

Browse files
committed
Fix instability in 026_overwrite_contrecord.pl test.
We've seen intermittent failures in this test on slower buildfarm machines, which I think can be explained by assuming that autovacuum emitted some additional WAL. Disable autovacuum to stabilize it. In passing, use stringwise not numeric comparison to compare WAL file names. Doesn't matter at present, but they are hex strings not decimal ... Discussion: https://postgr.es/m/1372189.1636499287@sss.pgh.pa.us
1 parent 5a1007a commit b66767b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/test/recovery/t/026_overwrite_contrecord.pl

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919

2020
my $node = PostgreSQL::Test::Cluster->new('primary');
2121
$node->init(allows_streaming => 1);
22-
$node->append_conf('postgresql.conf', 'wal_keep_size=1GB');
22+
# We need these settings for stability of WAL behavior.
23+
$node->append_conf(
24+
'postgresql.conf', qq(
25+
autovacuum = off
26+
wal_keep_size = 1GB
27+
));
2328
$node->start;
2429

2530
$node->safe_psql('postgres', 'create table filler (a int, b text)');
@@ -58,7 +63,7 @@ END
5863
#$node->safe_psql('postgres', qq{create table foo ()});
5964
my $endfile = $node->safe_psql('postgres',
6065
'SELECT pg_walfile_name(pg_current_wal_insert_lsn())');
61-
ok($initfile != $endfile, "$initfile differs from $endfile");
66+
ok($initfile ne $endfile, "$initfile differs from $endfile");
6267

6368
# Now stop abruptly, to avoid a stop checkpoint. We can remove the tail file
6469
# afterwards, and on startup the large message should be overwritten with new

0 commit comments

Comments
 (0)