Re: [HACKERS] More replication race conditions - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: [HACKERS] More replication race conditions
Date
Msg-id 17652eff-80b5-0e93-ccd5-37e1b58d7ec7@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] More replication race conditions  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 28/08/17 01:36, Michael Paquier wrote:
> On Sun, Aug 27, 2017 at 6:32 PM, Petr Jelinek
> <petr.jelinek@2ndquadrant.com> wrote:
>> Attached should fix this.
> 
> +$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(
> I am wondering if a similar check should actually go into
> pg_recvlogical_upto() instead. I tend to think that we've learned
> things the hard way with 3043c1dd and such.
> 

Putting it there can lead to tests that take forever to finish if
written incorrectly. This way they at least just fail.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] More replication race conditions
Next
From: Michael Malis
Date:
Subject: Re: [HACKERS] Re: Poor cost estimate with interaction between tablecorrelation and partial indexes