Re: BUG #13523: Unexplained deadlocks (possible race condition)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #13523: Unexplained deadlocks (possible race condition)
Дата
Msg-id 20150730083805.GA3161@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: BUG #13523: Unexplained deadlocks (possible race condition)  ("Jack Douglas" <jack@douglastechnology.co.uk>)
Ответы Re: BUG #13523: Unexplained deadlocks (possible race condition)  ("Jack Douglas" <jack@douglastechnology.co.uk>)
Список pgsql-bugs
On 2015-07-30 09:23:10 +0100, Jack Douglas wrote:
> If parsing the INSERT aquires the RowExclusiveLock, perhaps parsing the LOCK
> statement should also aquire the lock? That would mean the following
> principle in the documentation ("...The best defense against deadlocks is
> generally to avoid them by being certain that all applications using a
> database acquire locks on multiple objects in a consistent order...",
> http://www.postgresql.org/docs/9.4/static/explicit-locking.html#LOCKING-DEAD
> LOCKS) would be possible (or at least more easily understood) when using
> SQL-language functions.

I don't think that'd help at all? The problem here is the lock upgrade
from RowExclusiveLock to the exclusive lock, and that'll not be fixed by
that proposal?

Regards,

Andres

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

Предыдущее
От: "Jack Douglas"
Дата:
Сообщение: Re: BUG #13523: Unexplained deadlocks (possible race condition)
Следующее
От: marko@joh.to
Дата:
Сообщение: BUG #13528: LATERAL vs. correlated scalar subquery