Re: Inadequate executor locking of indexes

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: Inadequate executor locking of indexes
Дата
Msg-id
20190820211650.knbg7bldil65sytc@alap3.anarazel.de
Ответ на
Список
Дерево обсуждения
Inadequate executor locking of indexes Tom Lane <tgl@sss.pgh.pa.us>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Andres Freund <andres@anarazel.de>
Re: Inadequate executor locking of indexes Tom Lane <tgl@sss.pgh.pa.us>
Re: Inadequate executor locking of indexes Amit Kapila <amit.kapila16@gmail.com>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Julien Rouhaud <rjuju123@gmail.com>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Julien Rouhaud <rjuju123@gmail.com>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Tom Lane <tgl@sss.pgh.pa.us>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Re: Inadequate executor locking of indexes Tom Lane <tgl@sss.pgh.pa.us>
Re: Inadequate executor locking of indexes David Rowley <david.rowley@2ndquadrant.com>
Hi,

On 2018-11-23 17:41:26 +1300, David Rowley wrote:
> Ideally, the locking code would realise we already hold a stronger
> lock and skip the lock, but I don't see how that's realistically
> possible without probing the hash table for all stronger lock types
> first, which would likely damage the performance of locking.

That seems kind of a self-made problem to me. I don't think there's
anything really forcing us to have the locallock hashtable contain the
lockmode.  It'd not be a trivial change, but we could have the locallock
entry have enough information to allow us to avoid hitting the shared
table if we hold a stronger lock already.  The biggest complexity
probably would be that we'd need code to downgrade the shared lock we
currently hold, when the more heavyweight lock is released.


This made me look at LockAcquireExtended() just now. When we acquire a
lock that's weaker than one already held, and there's another backend
waiting for a conflicting lock, that only works if NOWAIT isn't
used. That's because only ProcSleep() gets around to checking whether we
already hold a stronger lock, but LockAcquireExtended() bails out for
NOWAIT long before that.  None of that is documented in
LockAcquireExtended(). Isn't that a bit weird?

Greetings,

Andres Freund


В списке pgsql-hackers по дате отправления
От: Alvaro Herrera
Дата:
Сообщение: Re: Improve default partition
От: Andres Freund
Дата:
FAQ