Skip to content

Commit 0806cd2

Browse files
committed
Fix race condition in t/028_pitr_timelines.pl.
Per buildfarm members sungazer and mylodon. Back-patch to v15, which introduced this test. Discussion: https://postgr.es/m/20220627070457.GA2176699@rfd.leadboat.com
1 parent 37ef8e1 commit 0806cd2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/recovery/t/028_pitr_timelines.pl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@
140140
# back to this timeline.
141141
$node_pitr->safe_psql('postgres', "INSERT INTO foo VALUES(3);");
142142

143+
# Wait for the archiver to be running. The startup process might have yet to
144+
# exit, in which case the postmaster has not started the archiver. If we
145+
# stop() without an archiver, the archive will be incomplete.
146+
$node_pitr->poll_query_until('postgres',
147+
"SELECT true FROM pg_stat_activity WHERE backend_type = 'archiver';")
148+
or die "Timed out while waiting for archiver to start";
149+
143150
# Stop the node. This archives the last segment.
144151
$node_pitr->stop();
145152

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy