Re: BUG #13523: Unexplained deadlocks (possible race condition)
В списке pgsql-bugs по дате отправления:
| От | Jack Douglas |
|---|---|
| Тема | Re: BUG #13523: Unexplained deadlocks (possible race condition) |
| Дата | |
| Msg-id | 01b001d0caa5$b8ea93e0$2abfbba0$@douglastechnology.co.uk обсуждение |
| Ответ на | Re: BUG #13523: Unexplained deadlocks (possible race condition) (Andres Freund <andres@anarazel.de>) |
| Список | pgsql-bugs |
> 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? The problem is that the RowExclusiveLock is being aquired in one session before the Exclusive lock, even though the LOCK TABLE statement is physically first in the SQL function. Because the locks are being acquired out-of-order, deadlocks become possible as another session tries to escalate the lock and waits, then the first session tries to escalate it's own lock and deadlocks. Normally this is prevented by acquiring the most restrictive lock first, but with a SQL-language function (unlike plpgsql for example) this is not possible. This is how I understand Tom's initial reply, is that not right?
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера