Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional - Mailing list pgsql-hackers

From David Steele
Subject Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional
Date
Msg-id 35b7530c-68ce-7090-e13c-e39e4dac9bca@pgmasters.net
Whole thread Raw
In response to Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 2/27/17 7:38 PM, Michael Paquier wrote:
> On Tue, Feb 28, 2017 at 9:25 AM, David Steele <david@pgmasters.net> wrote:
>> I also marked the pg_stop_* functions as parallel restricted, the same
>> as pg_start_backup().  Previously they were parallel safe which I don't
>> believe is accurate for the non-exclusive version at the very least,
>> since it is tied to a particular backend.
> 
> Yeah, those should really be parallel restricted. For the exclusive
> version, having the function run in parallel would also lead to errors
> per the presence/lack of backup_label file.

I'm not sure that's the case.  It seems like it should lock just as
multiple backends would now.  One process would succeed and the others
would error.  Maybe I'm missing something?

Either way, I don't think the behavior makes any sense.  Parallel safe
seems more sensible.

-- 
-David
david@pgmasters.net



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional
Next
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] PATCH: two slab-like memory allocators