summaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/lock.c
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2010-01-23 16:37:12 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2010-01-23 16:37:12 +0000
commit959ac58c04130d467fb05e63a3ceb8e2ded404c7 (patch)
tree314eeeea7c6c8afa7cbe35bfe5ecde04eff35f71 /src/backend/storage/lmgr/lock.c
parent4fa69e566cf1b836ae8aa9bee24ab0c556cfe94e (diff)
In HS, Startup process sets SIGALRM when waiting for buffer pin. If
woken by alarm we send SIGUSR1 to all backends requesting that they check to see if they are blocking Startup process. If so, they throw ERROR/FATAL as for other conflict resolutions. Deadlock stop gap removed. max_standby_delay = -1 option removed to prevent deadlock.
Diffstat (limited to 'src/backend/storage/lmgr/lock.c')
-rw-r--r--src/backend/storage/lmgr/lock.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 74fbcbd18ec..ea781a8b29c 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.190 2010/01/02 16:57:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.191 2010/01/23 16:37:12 sriggs Exp $
*
* NOTES
* A lock table is a shared memory hash table. When
@@ -815,25 +815,6 @@ LockAcquireExtended(const LOCKTAG *locktag,
}
/*
- * In Hot Standby we abort the lock wait if Startup process is waiting
- * since this would result in a deadlock. The deadlock occurs because
- * if we are waiting it must be behind an AccessExclusiveLock, which
- * can only clear when a transaction completion record is replayed.
- * If Startup process is waiting we never will clear that lock, so to
- * wait for it just causes a deadlock.
- */
- if (RecoveryInProgress() && !InRecovery &&
- locktag->locktag_type == LOCKTAG_RELATION)
- {
- LWLockRelease(partitionLock);
- ereport(ERROR,
- (errcode(ERRCODE_T_R_DEADLOCK_DETECTED),
- errmsg("possible deadlock detected"),
- errdetail("process conflicts with recovery - please resubmit query later"),
- errdetail_log("process conflicts with recovery")));
- }
-
- /*
* Set bitmask of locks this process already holds on this object.
*/
MyProc->heldLocks = proclock->holdMask;