RE: Wrong FOR UPDATE lock type

Поиск
Список
Период
Сортировка
От Mikheev, Vadim
Тема RE: Wrong FOR UPDATE lock type
Дата
Msg-id 8F4C99C66D04D4118F580090272A7A234D31C9@sectorbase1.sectorbase.com
обсуждение исходный текст
Ответ на Wrong FOR UPDATE lock type  (Jan Wieck <janwieck@yahoo.com>)
Список pgsql-hackers
> Well, there is a theoretical chance of deadlock --- not against other
> transactions doing the same thing, since RowShareLock and
> RowExclusiveLock don't conflict, but you could construct deadlock
> scenarios involving other transactions that grab ShareLock or
> ShareRowExclusiveLock.  So I don't think it's appropriate for the
> "deadlock risk" check to ignore RowShareLock->RowExclusiveLock
> upgrades.

There is theoretical chance of deadlock when two xactions lock
tables in different order and we can check this only in deadlock
detection code.

> But I'm not sure the check should be enabled in production releases
> anyway.  I just put it in as a quick and dirty debug check.  Perhaps
> it should be under an #ifdef that's not enabled by default.

No reason to learn users during transaction processing. We need in
good deadlock detection code and documentation.

Vadim


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

Предыдущее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: beta testing version
Следующее
От: "Martin A. Marques"
Дата:
Сообщение: Re: beta testing version