Re: Deadlock on the same object?

Поиск
Список
Период
Сортировка
Искать
От
Itagaki Takahiro
Тема
Re: Deadlock on the same object?
Дата
Msg-id
20091112091022.A945.52131E4D@oss.ntt.co.jp
Ответ на
Список
Дерево обсуждения
Deadlock on the same object? Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Re: Deadlock on the same object? Tom Lane <tgl@sss.pgh.pa.us>
Re: Deadlock on the same object? Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>

Tom Lane  wrote:

> I think this is an artifact of the fact that SQL functions parse the
> whole querystring before executing any of it.  Parsing of "DELETE FROM
> a" will result in acquiring ROW EXCLUSIVE lock on a, and then when the
> LOCK commands are executed, you have a lock-upgrade scenario and the
> deadlock is unsurprising.

Thanks. It's a surprise for me :-).

> There was some discussion of changing that awhile ago, but I forget
> what the conclusion was.  In any case nothing's been done about it.

We cannot make a package of locking controls in a function under
the current behavior. It would be good to improve this area.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления
От: Andrew Chernow
Дата:
Сообщение: Re: Listen / Notify rewrite
От: Itagaki Takahiro
Дата:
FAQ