pgsql: Move CheckRecoveryConflictDeadlock() call to a safer place.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Move CheckRecoveryConflictDeadlock() call to a safer place.
Дата
Msg-id E1QoKSn-0000iw-QF@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Move CheckRecoveryConflictDeadlock() call to a safer place.

This kluge was inserted in a spot apparently chosen at random: the lock
manager's state is not yet fully set up for the wait, and in particular
LockWaitCancel hasn't been armed by setting lockAwaited, so the ProcLock
will not get cleaned up if the ereport is thrown.  This seems to not cause
any observable problem in trivial test cases, because LockReleaseAll will
silently clean up the debris; but I was able to cause failures with tests
involving subtransactions.

Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.
Back-patch to all affected branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ac36e6f71f197540b8ee83c97f338ae5e5163f30

Modified Files
--------------
src/backend/storage/ipc/standby.c |   23 ++++++++++++-----------
src/backend/storage/lmgr/lock.c   |    7 -------
src/backend/storage/lmgr/proc.c   |    9 +++++++++
src/include/storage/standby.h     |    2 +-
4 files changed, 22 insertions(+), 19 deletions(-)


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Move CheckRecoveryConflictDeadlock() call to a safer place.