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

Commit740c9da

Browse files
committed
fixes to lock debugging macros from Massimo Dal Zotto
1 parent00a420d commit740c9da

File tree

1 file changed

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

1 file changed

+9
-6
lines changed

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

Lines changed: 9 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.39 1998/12/15 12:46:30 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.40 1999/01/17 20:59:56 tgl Exp $
1111
*
1212
* NOTES
1313
* Outside modules can create a lock table and acquire/release
@@ -79,7 +79,8 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
7979
#defineLOCK_PRINT(where,lock,type) \
8080
if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
8181
&& (lock->tag.relId >= lockDebugOidMin)) \
82-
|| (lock->tag.relId == lockDebugRelation)) \
82+
|| \
83+
(lockDebugRelation && (lock->tag.relId == lockDebugRelation))) \
8384
LOCK_PRINT_AUX(where,lock,type)
8485

8586
#defineLOCK_PRINT_AUX(where,lock,type) \
@@ -113,8 +114,9 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
113114
if (((LOCKDEBUG(XIDENT_LOCKMETHOD(*(xidentP))) >= 1) \
114115
&& (((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
115116
>= lockDebugOidMin)) \
116-
|| (((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
117-
== lockDebugRelation)) \
117+
|| (lockDebugRelation && \
118+
(((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
119+
== lockDebugRelation))) \
118120
XID_PRINT_AUX(where,xidentP)
119121

120122
#defineXID_PRINT_AUX(where,xidentP) \
@@ -1206,7 +1208,8 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
12061208
{
12071209
if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >=1) \
12081210
&& (lock->tag.relId >=lockDebugOidMin)) \
1209-
|| (lock->tag.relId==lockDebugRelation))
1211+
|| \
1212+
(lockDebugRelation&& (lock->tag.relId==lockDebugRelation)))
12101213
TPRINTF(TRACE_ALL,"LockRelease: no wakeup needed");
12111214
}
12121215

@@ -1290,7 +1293,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
12901293
lock= (LOCK*)MAKE_PTR(xidLook->tag.lock);
12911294

12921295
xidtag_lockmethod=XIDENT_LOCKMETHOD(*xidLook);
1293-
if ((xidtag_lockmethod==lockmethod)|| (trace_flag >=2))
1296+
if ((xidtag_lockmethod==lockmethod)&&pg_options[trace_flag])
12941297
{
12951298
XID_PRINT("LockReleaseAll",xidLook);
12961299
LOCK_PRINT("LockReleaseAll",lock,0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp