Re: BUG #17591: elog(ERROR) cause SharedSnapshotLock deadlock

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17591: elog(ERROR) cause SharedSnapshotLock deadlock
Дата
Msg-id 257677.1661174018@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17591: elog(ERROR) cause SharedSnapshotLock deadlock  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> in lock.c, we can see code  Release lock before return    , e.g.
> ...
> bug we can see some code doesn't release the lock. Does it may cause
> deadlock?

Transaction cleanup will automatically release all locks (and other
resources too).  So the places that do a manual release before
elog(ERROR) are something of a waste of code space.  It might be worth
doing that if you're concerned about holding the lock for the minimum
possible amount of time; but usually that's only a consideration for
very heavily-contended spinlocks or LWLocks.

            regards, tom lane



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: fetching bytea (blob) data of 850 MB from psql client failed
Следующее
От: "Garbuz, Yakov [ASM Research]"
Дата:
Сообщение: Re: [External] Re: BUG #17585: Wrong path to the extension control file