Re: Reducing relation locking overhead

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reducing relation locking overhead
Дата
Msg-id 10748.1134054315@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Reducing relation locking overhead  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Reducing relation locking overhead  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> Further thoughts:
> 1. Normally, we do not lock indexes via the LockMgrLock

> 2. When a REINDEX-like operation comes along, it first of all updates an
> MaintIntentLock flag on the index relation, which causes a relcache
> invalidation. It then waits until all backends have updated their
> relcache.

There isn't any way for it to do that (ie, be sure everyone else has
adjusted to the new state of affairs), short of acquiring some sort of
short-term exclusive lock on the table, which is a really bad idea.
The pending lock would block other incoming requests on the table until
all the current users exited their transactions.

I think the idea of not doing locking on indexes was pretty much shot
down in this thread, and we have to go looking for other solutions ...
thus my other proposal.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Vertical Partitioning with TOAST
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Reducing contention for the LockMgrLock