Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4f4c72c

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 f172b11 commit 4f4c72c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

+7
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)