Re: [HACKERS] tablelevel and rowlevel locks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] tablelevel and rowlevel locks
Дата
Msg-id 18539.1062724360@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] tablelevel and rowlevel locks  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
Список pgsql-general
Alvaro Herrera Munoz <alvherre@dcc.uchile.cl> writes:
> Anyway, I think the LOCK structure represents something that can be locked.

Right.

> The PROCLOCK struct represents that some process is holding a lock on said
> object.

IIRC, a PROCLOCK is created as soon as some backend tries to lock some
lockable object.  So the PROCLOCK may only indicate that that backend is
waiting for a lock on that object, not that it already has one.

> That may be the reason why you are seeing that a lock is held by more
> than one process at the same time (while in fact some of them are probably
> _waiting_ for the lock).

Also keep in mind that we use a lot of sharable lock modes --- so it's
entirely likely that multiple processes actually do have locks on the
same object.  That's not wrong if their lock modes don't conflict.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: descending Indexes
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Replaceing records