Re: pg_promote not marked as parallel-restricted in pg_proc.dat - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_promote not marked as parallel-restricted in pg_proc.dat
Date
Msg-id 20181101004346.GD1727@paquier.xyz
Whole thread Raw
In response to Re: pg_promote not marked as parallel-restricted in pg_proc.dat  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_promote not marked as parallel-restricted in pg_proc.dat  (Amit Kapila <amit.kapila16@gmail.com>)
Re: pg_promote not marked as parallel-restricted in pg_proc.dat  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Oct 31, 2018 at 01:09:53PM -0400, Robert Haas wrote:
> There's no rule whatsoever that a parallel worker can't write to the
> disk.  pg_start_backup and pg_stop_backup have to be
> parallel-restricted because, when used in non-exclusive mode, they
> establish backend-local state that wouldn't be synchronized with the
> state in the workers -- namely the information that a non-exclusive
> backup is in progress.

Okay, but likely we would not want to signal the postmaster
unnecessarily, no?  FALLBACK_PROMOTE_SIGNAL_FILE gets discarded if
promotion is triggered more than once, but that does not like a sane
thing to do if not necessary.

As far as I understand, there has been some input on this thread:
- I would prefer marking the function as parallel-restricted.
- Tom would make it parallel-unsafe.
- Laurenz (author of the feature) is fine with restricted or unsafe.

It is a bit hard to make a decision from that :)
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: COPY FROM WHEN condition
Next
From: David Rowley
Date:
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables