Re: Delay locking partitions during INSERT and UPDATE - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Delay locking partitions during INSERT and UPDATE
Date
Msg-id CA+TgmoZq7aiLR9tGB59wMzgFxTGXuY4d4RuLZXvoc4Pz7UUM4w@mail.gmail.com
Whole thread Raw
In response to Re: Delay locking partitions during INSERT and UPDATE  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On Tue, Feb 19, 2019 at 4:07 PM David Rowley
<david.rowley@2ndquadrant.com> wrote:
> I'd say that here we should only discuss what this patch is doing, ...

On that note, I spent some more time looking at what the patch is doing today.

     /*
      * We locked all the partitions in ExecSetupPartitionTupleRouting
      * including the leaf partitions.
      */
-    partrel = table_open(dispatch->partdesc->oids[partidx], NoLock);
+    partrel = table_open(dispatch->partdesc->oids[partidx], RowExclusiveLock);

It seems to me that the reason for this change is precisely that the
comment is now false, and therefore the comment needs to be updated.

Does that sound right?

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


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: list append syntax for postgresql.conf
Next
From: Tom Lane
Date:
Subject: Re: speeding up planning with partitions