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

Commitb982c3b

Browse files
committed
Add missing SpinRelease() to a couple of error exits --- bug found while
testing concurrent VACUUMs.
1 parent4dded12 commitb982c3b

File tree

1 file changed

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

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.62 1999/09/18 19:07:38 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.63 1999/11/28 01:56:48 tgl Exp $
1111
*
1212
* NOTES
1313
* Outside modules can create a lock table and acquire/release
@@ -595,6 +595,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
595595
HASH_ENTER,&found);
596596
if (!result)
597597
{
598+
SpinRelease(masterLock);
598599
elog(NOTICE,"LockAcquire: xid table corrupted");
599600
return FALSE;
600601
}
@@ -738,6 +739,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
738739
XID_PRINT_AUX("LockAcquire: INCONSISTENT ",result);
739740
LOCK_PRINT_AUX("LockAcquire: INCONSISTENT ",lock,lockmode);
740741
/* Should we retry ? */
742+
SpinRelease(masterLock);
741743
return FALSE;
742744
}
743745
XID_PRINT("LockAcquire: granted",result);
@@ -2000,8 +2002,6 @@ DumpLocks()
20002002
XIDLookupEnt*xidLook=NULL;
20012003
XIDLookupEnt*tmp=NULL;
20022004
SHMEM_OFFSETend;
2003-
SPINLOCKmasterLock;
2004-
intnumLockModes;
20052005
LOCK*lock;
20062006
intcount=0;
20072007
intlockmethod=DEFAULT_LOCKMETHOD;
@@ -2020,9 +2020,6 @@ DumpLocks()
20202020
if (!lockMethodTable)
20212021
return;
20222022

2023-
numLockModes=lockMethodTable->ctl->numLockModes;
2024-
masterLock=lockMethodTable->ctl->masterLock;
2025-
20262023
if (SHMQueueEmpty(lockQueue))
20272024
return;
20282025

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp