Re: Delay locking partitions during INSERT and UPDATE

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Delay locking partitions during INSERT and UPDATE
Дата
Msg-id CA+TgmoZq7aiLR9tGB59wMzgFxTGXuY4d4RuLZXvoc4Pz7UUM4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Delay locking partitions during INSERT and UPDATE  (David Rowley <david.rowley@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: list append syntax for postgresql.conf
Следующее
От: Tom Lane
Дата:
Сообщение: Re: speeding up planning with partitions