Re: Lock contention, docs vs. reality

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Lock contention, docs vs. reality
Дата
Msg-id 20070422223337.S58490@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Lock contention, docs vs. reality  (Roland Turner <raz.cbfgterfdy.bet@raz.cx>)
Список pgsql-general
On Sun, 22 Apr 2007, Roland Turner wrote:

> I'm working with 7.4, but the 8.2 docs[1] have the same apparent error:
>
> ROW SHARE
>
>         Conflicts with the EXCLUSIVE and ACCESS EXCLUSIVE lock modes.
>
>         The SELECT FOR UPDATE and SELECT FOR SHARE commands acquire a
>         lock of this mode on the target table(s) (in addition to ACCESS
>         SHARE locks on any other tables that are referenced but not
>         selected FOR UPDATE/FOR SHARE).
>
> If that conflict list were correct, then ROW SHARE wouldn't conflict
> with itself, much less with ROW EXCLUSIVE (required to prevent
> INSERT/UPDATE/DELETE); commonsense dictates that it should conflict with
> both, and experiment demonstrates that it actually does so.

The list in question revolves around table-level locks. Those statements
mentioned also take out locks on affected rows. You should be able select
for update one row while updating a different row in the same table.

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Postgresql Help
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: can't start tsearch2 in 8.2.4