Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7edff16

Browse files
author
Hiroshi Inoue
committed
Disable query cancel during HandleDeadLock().
1 parent4b59366 commit7edff16

File tree

1 file changed

+7
-3
lines changed
  • src/backend/storage/lmgr

1 file changed

+7
-3
lines changed

‎src/backend/storage/lmgr/proc.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.89 2000/12/22 00:51:54 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.90 2001/01/09 09:38:57 inoue Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -48,7 +48,7 @@
4848
*This is so that we can support more backends. (system-wide semaphore
4949
*sets run out pretty fast.) -ay 4/95
5050
*
51-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.89 2000/12/22 00:51:54 tgl Exp $
51+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.90 2001/01/09 09:38:57 inoue Exp $
5252
*/
5353
#include"postgres.h"
5454

@@ -864,7 +864,9 @@ HandleDeadLock(SIGNAL_ARGS)
864864
{
865865
intsave_errno=errno;
866866
LOCK*mywaitlock;
867+
boolisWaitingForLock=lockWaiting;/* save waiting status */
867868

869+
SetWaitingForLock(false);/* disable query cancel during this fuction */
868870
LockLockTable();
869871

870872
/* ---------------------
@@ -884,6 +886,7 @@ HandleDeadLock(SIGNAL_ARGS)
884886
{
885887
UnlockLockTable();
886888
errno=save_errno;
889+
SetWaitingForLock(isWaitingForLock);/* restore waiting status */
887890
return;
888891
}
889892

@@ -897,6 +900,7 @@ HandleDeadLock(SIGNAL_ARGS)
897900
/* No deadlock, so keep waiting */
898901
UnlockLockTable();
899902
errno=save_errno;
903+
SetWaitingForLock(isWaitingForLock);/* restore waiting status */
900904
return;
901905
}
902906

@@ -911,7 +915,7 @@ HandleDeadLock(SIGNAL_ARGS)
911915
SHMQueueElemInit(&(MyProc->links));
912916
MyProc->waitLock=NULL;
913917
MyProc->waitHolder=NULL;
914-
lockWaiting= false;
918+
isWaitingForLock= false;/* wait for lock no longer */
915919

916920
/* ------------------
917921
* Unlock my semaphore so that the interrupted ProcSleep() call can finish.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp