LOCK ROW SHARE MODE

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема LOCK ROW SHARE MODE
Дата
Msg-id ECEHIKNFIMMECLEBJFIGCEFECCAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: LOCK ROW SHARE MODE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi All,

In the LOCK TABLE docs it documents the SELECT...FOR UPDATE as follows:


----
ROW SHARE MODE
Note: Automatically acquired by SELECT...FOR UPDATE. While it is a shared
lock, may be upgraded later to a ROW EXCLUSIVE lock.

Conflicts with EXCLUSIVE and ACCESS EXCLUSIVE lock modes.
----

However, if I begin a transaction in one window and SELECT...FOR UPDATE a
row, then begin a transaction in another window and SELECT ... FOR UPDATE
the same row, the second SELECT..FOR UPDATE blocks until the first
transactions is committed or rolled back.

So, shouldn't this mean that the ROW SHARE mode should in fact be documented
to conflict with itself???  And with this behaviour is it really a shared
lock?  I don't get it!

Chris




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: storing binary data
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CREATE OR REPLACE VIEW/TRIGGER