Re: foreign key locks

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: foreign key locks
Дата
Msg-id CA+TgmoaA962qucoiJKb+=NSmRyBppwDdbLnf6cF5=h1=7vQRtg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: foreign key locks  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Aug 22, 2012 at 5:31 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Patch v19 contains some tweaks.  Most notably,
>
> 1. if an Xid requests a lock A, and then a lock B which is stronger than
> A, then record only lock B and forget lock A.  This is important for
> performance, because EvalPlanQual obtains ForUpdate locks on the tuples
> that it chases on an update chain.  If EPQ was called by an update or
> delete, previously a MultiXact was being created.
>
> In a stock pgbench run this was causing lots of multis to be created,
> even when there are no FKs.
>
> This was most likely involved in the 9% performance decrease that was
> previously reported.

Ah-ha!  Neat.  I'll try to find some time to re-benchmark this during
the next CF, unless you did that already.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: NOT NULL constraints in foreign tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: plperl sigfpe reset can crash the server