diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-08-02 15:16:37 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-08-02 15:16:37 -0400 |
commit | 1318f1ad775d310fc7ce045603432c0f810dcdbf (patch) | |
tree | 512f528214dc655abaa88f1c9b7245138d12b38a /src/backend/storage/lmgr/lock.c | |
parent | 0dd6a09e3d127e728b9f43cfaf19e5351f60a096 (diff) |
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.
Diffstat (limited to 'src/backend/storage/lmgr/lock.c')
-rw-r--r-- | src/backend/storage/lmgr/lock.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index e3ad3199c4d..e3e1dd249f2 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -832,13 +832,6 @@ LockAcquireExtended(const LOCKTAG *locktag, } /* - * In Hot Standby perform early deadlock detection in normal backends. - * If deadlock found we release partition lock but do not return. - */ - if (RecoveryInProgress() && !InRecovery) - CheckRecoveryConflictDeadlock(partitionLock); - - /* * Set bitmask of locks this process already holds on this object. */ MyProc->heldLocks = proclock->holdMask; |