Re: change in LOCK behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: change in LOCK behavior
Дата
Msg-id 24391.1349980918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: change in LOCK behavior  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: change in LOCK behavior
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 11 October 2012 18:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If it worked, I might be amenable to that, but it doesn't.  You can't
>> trigger taking a new snapshot off whether we waited for a lock; that
>> still has race conditions, just ones that are not so trivial to
>> demonstrate manually.  (The other transaction might have committed
>> microseconds before you reach the point of waiting for the lock.)

> So where's the race?

Same example as before, except that the exclusive-lock-holding
transaction commits (and releases its lock) between the time that the
other transaction takes its parse/plan snapshot and the time that it
takes AccessShare lock on the table.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: change in LOCK behavior
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: September 2012 commitfest