summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-03-27 22:29:19 -0700
committerAndres Freund <andres@anarazel.de>2022-03-27 22:35:42 -0700
commit91c0570a791180aa3ff01d70eb16ed6c0d8283a3 (patch)
treef27cda06618d00f247d3a7f941759c5846bbf558 /src/test
parentda4b56662f2cda3ef97847307aaec8e8f66ffb15 (diff)
Don't fail for > 1 walsenders in 019_replslot_limit, add debug messages.
So far the first of the retries introduced in f28bf667f60 resolves the issue. But I (Andres) am still suspicious that the start of the failures might indicate a problem. To reduce noise, stop reporting a failure if a retry resolves the problem. To allow figuring out what causes the slow slot drop, add a few more debug messages to ReplicationSlotDropPtr. See also commit afdeff10526, fe0972ee5e6 and f28bf667f60. Discussion: https://postgr.es/m/20220327213219.smdvfkq2fl74flow@alap3.anarazel.de
Diffstat (limited to 'src/test')
-rw-r--r--src/test/recovery/t/019_replslot_limit.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/test/recovery/t/019_replslot_limit.pl b/src/test/recovery/t/019_replslot_limit.pl
index 77bb401bc5f..5654f3b5455 100644
--- a/src/test/recovery/t/019_replslot_limit.pl
+++ b/src/test/recovery/t/019_replslot_limit.pl
@@ -339,8 +339,8 @@ my $senderpid;
# We've seen occasional cases where multiple walsender pids are active. It
# could be that we're just observing process shutdown being slow. To collect
# more information, retry a couple times, print a bit of debugging information
-# each iteration. For now report a test failure even if later iterations
-# succeed.
+# each iteration. Don't fail the test if retries find just one pid, the
+# buildfarm failures are too noisy.
my $i = 0;
while (1)
{
@@ -349,7 +349,9 @@ while (1)
$senderpid = $node_primary3->safe_psql('postgres',
"SELECT pid FROM pg_stat_activity WHERE backend_type = 'walsender'");
- last if like($senderpid, qr/^[0-9]+$/, "have walsender pid $senderpid");
+ last if $senderpid =~ qr/^[0-9]+$/;
+
+ diag "multiple walsenders active in iteration $i";
# show information about all active connections
$node_primary3->psql('postgres',
@@ -370,6 +372,8 @@ while (1)
usleep(100_000);
}
+like($senderpid, qr/^[0-9]+$/, "have walsender pid $senderpid");
+
my $receiverpid = $node_standby3->safe_psql('postgres',
"SELECT pid FROM pg_stat_activity WHERE backend_type = 'walreceiver'");
like($receiverpid, qr/^[0-9]+$/, "have walreceiver pid $receiverpid");