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

Commite0095c6

Browse files
committed
Remove bogus 'xid loop detected' check, which actually wasn't detecting
loops, but just arbitrarily failing at 1000 locks.
1 parent2f19d11 commite0095c6

File tree

1 file changed

+8
-21
lines changed
  • src/backend/storage/lmgr

1 file changed

+8
-21
lines changed

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

Lines changed: 8 additions & 21 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/lock.c,v 1.66 2000/02/22 09:55:20 inoue Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.67 2000/04/30 21:23:31 tgl Exp $
1212
*
1313
* NOTES
1414
* Outside modules can create a lock table and acquire/release
@@ -492,14 +492,14 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
492492
intis_user_lock;
493493

494494
is_user_lock= (lockmethod==USER_LOCKMETHOD);
495+
#ifdefUSER_LOCKS_DEBUG
495496
if (is_user_lock)
496497
{
497-
#ifdefUSER_LOCKS_DEBUG
498498
TPRINTF(TRACE_USERLOCKS,"LockAcquire: user lock [%u] %s",
499499
locktag->objId.blkno,
500500
lock_types[lockmode]);
501-
#endif
502501
}
502+
#endif
503503
#endif
504504

505505
/* ???????? This must be changed when short term locks will be used */
@@ -1266,14 +1266,11 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
12661266
LOCK*lock;
12671267
boolfound;
12681268
inttrace_flag;
1269-
intxidtag_lockmethod;
1270-
1271-
#ifdefUSER_LOCKS
1272-
intis_user_lock_table,
1273-
count,
1269+
intxidtag_lockmethod,
12741270
nleft;
12751271

1276-
count=nleft=0;
1272+
#ifdefUSER_LOCKS
1273+
intis_user_lock_table;
12771274

12781275
is_user_lock_table= (lockmethod==USER_LOCKMETHOD);
12791276
trace_flag= (lockmethod==2) ?TRACE_USERLOCKS :TRACE_LOCKS;
@@ -1283,6 +1280,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
12831280
TPRINTF(trace_flag,"LockReleaseAll: lockmethod=%d, pid=%d",
12841281
lockmethod,MyProcPid);
12851282

1283+
nleft=0;
1284+
12861285
Assert(lockmethod<NumLockMethods);
12871286
lockMethodTable=LockMethodTable[lockmethod];
12881287
if (!lockMethodTable)
@@ -1304,16 +1303,6 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
13041303
{
13051304
boolwakeupNeeded= false;
13061305

1307-
/*
1308-
* Sometimes the queue appears to be messed up.
1309-
*/
1310-
if (count++>1000)
1311-
{
1312-
elog(NOTICE,"LockReleaseAll: xid loop detected, giving up");
1313-
nleft=0;
1314-
break;
1315-
}
1316-
13171306
/* ---------------------------
13181307
* XXX Here we assume the shared memory queue is circular and
13191308
* that we know its internal structure. Should have some sort of
@@ -1485,9 +1474,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
14851474
ProcLockWakeup(waitQueue,lockmethod,lock);
14861475
}
14871476

1488-
#ifdefUSER_LOCKS
14891477
next_item:
1490-
#endif
14911478
if (done)
14921479
break;
14931480
SHMQueueFirst(&xidLook->queue, (Pointer*)&tmp,&tmp->queue);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp