From: David Steele <david@pgmasters.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: Make pg_stop_backup() archive wait optional
Date: Tue, 28 Feb 2017 22:37:14 -0500
Message-ID: <aa775a6f-059c-47dc-ef87-1f017073014b@pgmasters.net> (raw)
In-Reply-To: <CA+TgmoYCWfO2UM-t=HUMFJyxJywLDiLL0nAJpx88LKtvBvNECw@mail.gmail.com>
References: <758e3fd1-45b4-5e28-75cd-e9e7f93a4c02@pgmasters.net>
<CAB7nPqRf6LnNN3TZZGi5DJ8sTWE5XekBSAj7E0CqsJ1nDGhiEA@mail.gmail.com>
<35b7530c-68ce-7090-e13c-e39e4dac9bca@pgmasters.net>
<CAB7nPqS-vH_Hk=+n63SHKS4ZrpknwNN9KMr9WkPZ9De=wU02Yg@mail.gmail.com>
<967b90bd-6b65-a18a-5266-bfa9191c40e6@pgmasters.net>
<CA+TgmoYCWfO2UM-t=HUMFJyxJywLDiLL0nAJpx88LKtvBvNECw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2/28/17 10:22 PM, Robert Haas wrote:
> On Tue, Feb 28, 2017 at 6:22 AM, David Steele <david@pgmasters.net> wrote:
>>>> 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?
>>>
>>> Hm, any errors happening in the workers would be reported to the
>>> leader, meaning that even if one worker succeeded to run
>>> pg_start_backup() it would be reported as an error at the end to the
>>> client, no? By marking the exclusive function restricted we get sure
>>> that it is just the leader that fails or succeeds.
>>
>> Good point, and it strengthens the argument beyond, "it just seems right."
>
> I think the argument should be based on whether or not the function
> depends on backend-private state that will not be synchronized.
> That's the definition of what makes something parallel-restricted or
> not.
Absolutely. Yesterday was a long day so I may have (perhaps) become a
bit flippant.
> It looks like pg_start_backup() and pg_stop_backup() depend on the
> backend-private global variable nonexclusive_backup_running, so they
> should be parallel-restricted.
Agreed.
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david@pgmasters.net, robertmhaas@gmail.com, michael.paquier@gmail.com
Subject: Re: PATCH: Make pg_stop_backup() archive wait optional
In-Reply-To: <aa775a6f-059c-47dc-ef87-1f017073014b@pgmasters.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox