Re: [HACKERS] Parallel worker error - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Parallel worker error
Date
Msg-id CA+TgmoZUX-Y5Bx0SyAjDctxZmY_8KeXj3WNG6i+uJNFT-s91RA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Parallel worker error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Parallel worker error  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: [HACKERS] Parallel worker error  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] Parallel worker error  (Amit Kapila <amit.kapila16@gmail.com>)
Re: [HACKERS] Parallel worker error  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers
On Wed, Aug 30, 2017 at 9:58 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The problem here is exactly that we cannot transmit the leader's
> state to the worker.  You can't blame it on SET ROLE, because
> I didn't do one.

Hmm, that's a good reason for holding it blameless.  In this case,
I'll blame the fact that we allow a role to be dropped while there are
users connected using that role.  That's about as sensible as allowing
a table to be dropped while there are users reading from it, or a
database to be dropped while there are users connected to it, both of
which we in fact prohibit.  IOW, I'd say the problem is that we've
allowed the system state to become inconsistent and now we're sad
because stuff doesn't work.

But since that's an established design fl^H^Hprinciple, maybe that
means we should go with the approach of teaching SerializeGUCState()
to ignore role altogether and instead have ParallelWorkerMain call
SetCurrentRoleId using information passed via the FixedParallelState
(not sure of the precise details here).

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: amul sul
Date:
Subject: Re: [HACKERS] Hash Functions
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] segment size depending *_wal_size defaults (wasincreasing the default WAL segment size)