*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.89 2000/12/22 00:51:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.90 2001/01/09 09:38:57 inoue Exp $
*
*-------------------------------------------------------------------------
*/
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.89 2000/12/22 00:51:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.90 2001/01/09 09:38:57 inoue Exp $
*/
#include "postgres.h"
{
int save_errno = errno;
LOCK *mywaitlock;
+ bool isWaitingForLock = lockWaiting; /* save waiting status */
+ SetWaitingForLock(false); /* disable query cancel during this fuction */
LockLockTable();
/* ---------------------
{
UnlockLockTable();
errno = save_errno;
+ SetWaitingForLock(isWaitingForLock); /* restore waiting status */
return;
}
/* No deadlock, so keep waiting */
UnlockLockTable();
errno = save_errno;
+ SetWaitingForLock(isWaitingForLock); /* restore waiting status */
return;
}
SHMQueueElemInit(&(MyProc->links));
MyProc->waitLock = NULL;
MyProc->waitHolder = NULL;
- lockWaiting = false;
+ isWaitingForLock = false; /* wait for lock no longer */
/* ------------------
* Unlock my semaphore so that the interrupted ProcSleep() call can finish.