aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-11-09 18:40:19 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-11-09 18:40:19 -0500
commitb66767b56b1cd082f3499a7e5a21b480dd004f51 (patch)
treeff22f1613e11d8508a422184a32a45cb154f9234
parent5a1007a5088cd6ddf892f7422ea8dbaef362372f (diff)
downloadpostgresql-b66767b56b1cd082f3499a7e5a21b480dd004f51.tar.gz
postgresql-b66767b56b1cd082f3499a7e5a21b480dd004f51.zip
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
-rw-r--r--src/test/recovery/t/026_overwrite_contrecord.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/recovery/t/026_overwrite_contrecord.pl b/src/test/recovery/t/026_overwrite_contrecord.pl
index 70705ab91de..b78c2fd7912 100644
--- a/src/test/recovery/t/026_overwrite_contrecord.pl
+++ b/src/test/recovery/t/026_overwrite_contrecord.pl
@@ -19,7 +19,12 @@ plan tests => 3;
my $node = PostgreSQL::Test::Cluster->new('primary');
$node->init(allows_streaming => 1);
-$node->append_conf('postgresql.conf', 'wal_keep_size=1GB');
+# We need these settings for stability of WAL behavior.
+$node->append_conf(
+ 'postgresql.conf', qq(
+autovacuum = off
+wal_keep_size = 1GB
+));
$node->start;
$node->safe_psql('postgres', 'create table filler (a int, b text)');
@@ -58,7 +63,7 @@ $node->safe_psql('postgres',
#$node->safe_psql('postgres', qq{create table foo ()});
my $endfile = $node->safe_psql('postgres',
'SELECT pg_walfile_name(pg_current_wal_insert_lsn())');
-ok($initfile != $endfile, "$initfile differs from $endfile");
+ok($initfile ne $endfile, "$initfile differs from $endfile");
# Now stop abruptly, to avoid a stop checkpoint. We can remove the tail file
# afterwards, and on startup the large message should be overwritten with new