Fix yet another race condition in recovery/t/

In commit 5c77690f6, we added polling in front of most of the
get_slot_xmins calls in, but today's results from
buildfarm member nightjar show that at least one more poll loop
is needed.

Proactively add a poll loop before the next-to-last get_slot_xmins call
as well.  It may be that there is no race condition there because the
standby_2 server is shut down at that point, but I'm quite tired of
fighting with this test script.  The empirical evidence that it's safe,
from the buildfarm, is no stronger than the evidence for the other
call that nightjar just proved unsafe.

The only remaining get_slot_xmins calls without wait_slot_xmins
protection are the first two, which should be OK since nothing has
happened at that point.  It's tempting to ignore that special case
and merge get_slot_xmins and wait_slot_xmins into a single function.
I didn't go that far though.




Modified Files
src/test/recovery/t/ | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Sent via pgsql-committers mailing list (
To make changes to your subscription:

Reply via email to