Re: [HACKERS] SERIALIZABLE with parallel query

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Kevin Grittner <kgrittn(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] SERIALIZABLE with parallel query
Date: 2018-03-07 21:28:22
Message-ID: CA+Tgmoa0y20_49a+7b_CMoZv79Xz-sVjuC=Dht0mXf9Y+UfvsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 28, 2018 at 11:35 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Mon, Feb 26, 2018 at 6:37 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>> I've now broken it into two patches.
>
> Rebased.

+SerializableXactHandle
+ShareSerializableXact(void)
+{
+ Assert(!IsParallelWorker());
+
+ return MySerializableXact;
+}

Uh, how's that OK? There's no rule that you can't create a
ParallelContext in a worker. Parallel query currently doesn't, so it
probably won't happen, but burying an assertion to that effect in the
predicate locking code doesn't seem nice.

Is "sxact" really the best (i.e. clearest) name we can come up with
for the lock tranche?

--
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 Peter Eisentraut 2018-03-07 21:48:13 Re: public schema default ACL
Previous Message David Fetter 2018-03-07 21:16:21 Re: csv format for psql