Re: Parallel worker error

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel worker error
Date: 2017-08-30 15:19:38
Message-ID: CA+TgmoZUX-Y5Bx0SyAjDctxZmY_8KeXj3WNG6i+uJNFT-s91RA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 30, 2017 at 9:58 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-08-30 15:27:33 Re: segment size depending *_wal_size defaults (was increasing the default WAL segment size)
Previous Message amul sul 2017-08-30 14:43:34 Re: Hash Functions