Re: New lock types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: New lock types
Дата
Msg-id 12139.1033937326@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: New lock types  (Alvaro Herrera <alvherre@atentus.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@atentus.com> writes:
> I think creating a new LWLockId (BTFreeListLock?) can help here.  The
> operations on freelist are short lived and rather infrequent so it
> doesn't seem to matter that it is global to all indexes.

Seems like a really bad idea to me ... what makes you think that this
would not be a bottleneck?  You'd have to take such a lock during every
index-page split, which is not that uncommon.

> Another way
> would be to create one LockId per index, but it seems a waste to me.

No, you should be looking at a way to represent index locking in the
standard lock manager, not as an LWLock.  We've already got a concept
of page-level lockable entities there.
        regards, tom lane


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

Предыдущее
От: Greg Copeland
Дата:
Сообщение: Re: Proposed LogWriter Scheme, WAS: Potential Large
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Naming convention