mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 03:21:24 +03:00
Avoid race condition in logical replication test
Wait for slot to become inactive before continuing. Author: Petr Jelinek
This commit is contained in:
parent
44654f3d25
commit
3950e07eb4
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user