Commit 4f27c674 authored by Simon Riggs's avatar Simon Riggs

Avoid race condition in logical replication test

Wait for slot to become inactive before continuing.

Author: Petr Jelinek
parent be716156
......@@ -78,6 +78,11 @@ chomp($stdout_recv);
is($stdout_recv, $expected,
'got same expected output from pg_recvlogical decoding session');
$node_master->poll_query_until('postgres',
"SELECT EXISTS (SELECT 1 FROM pg_replication_slots WHERE slot_name = 'test_slot' AND active_pid IS NULL)"
)
or die "slot never became inactive";
$stdout_recv = $node_master->pg_recvlogical_upto(
'postgres', 'test_slot', $endpos, 10,
'include-xids' => '0',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment