Re: [HACKERS] SERIALIZABLE with parallel query - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] SERIALIZABLE with parallel query
Date
Msg-id CA+Tgmoa0y20_49a+7b_CMoZv79Xz-sVjuC=Dht0mXf9Y+UfvsA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] SERIALIZABLE with parallel query  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [HACKERS] SERIALIZABLE with parallel query  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On Wed, Feb 28, 2018 at 11:35 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Mon, Feb 26, 2018 at 6:37 PM, Thomas Munro
> <thomas.munro@enterprisedb.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


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: csv format for psql
Next
From: Peter Eisentraut
Date:
Subject: Re: public schema default ACL