Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
e0095c6c
Commit
e0095c6c
authored
25 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Remove bogus 'xid loop detected' check, which actually wasn't detecting
loops, but just arbitrarily failing at 1000 locks.
parent
2f19d11f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/storage/lmgr/lock.c
+8
-21
8 additions, 21 deletions
src/backend/storage/lmgr/lock.c
with
8 additions
and
21 deletions
src/backend/storage/lmgr/lock.c
+
8
−
21
View file @
e0095c6c
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.6
6
2000/0
2/22 09:55:20 inoue
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.6
7
2000/0
4/30 21:23:31 tgl
Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -492,14 +492,14 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
...
@@ -492,14 +492,14 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
int
is_user_lock
;
int
is_user_lock
;
is_user_lock
=
(
lockmethod
==
USER_LOCKMETHOD
);
is_user_lock
=
(
lockmethod
==
USER_LOCKMETHOD
);
#ifdef USER_LOCKS_DEBUG
if
(
is_user_lock
)
if
(
is_user_lock
)
{
{
#ifdef USER_LOCKS_DEBUG
TPRINTF
(
TRACE_USERLOCKS
,
"LockAcquire: user lock [%u] %s"
,
TPRINTF
(
TRACE_USERLOCKS
,
"LockAcquire: user lock [%u] %s"
,
locktag
->
objId
.
blkno
,
locktag
->
objId
.
blkno
,
lock_types
[
lockmode
]);
lock_types
[
lockmode
]);
#endif
}
}
#endif
#endif
#endif
/* ???????? This must be changed when short term locks will be used */
/* ???????? This must be changed when short term locks will be used */
...
@@ -1266,14 +1266,11 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
...
@@ -1266,14 +1266,11 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
LOCK
*
lock
;
LOCK
*
lock
;
bool
found
;
bool
found
;
int
trace_flag
;
int
trace_flag
;
int
xidtag_lockmethod
;
int
xidtag_lockmethod
,
#ifdef USER_LOCKS
int
is_user_lock_table
,
count
,
nleft
;
nleft
;
count
=
nleft
=
0
;
#ifdef USER_LOCKS
int
is_user_lock_table
;
is_user_lock_table
=
(
lockmethod
==
USER_LOCKMETHOD
);
is_user_lock_table
=
(
lockmethod
==
USER_LOCKMETHOD
);
trace_flag
=
(
lockmethod
==
2
)
?
TRACE_USERLOCKS
:
TRACE_LOCKS
;
trace_flag
=
(
lockmethod
==
2
)
?
TRACE_USERLOCKS
:
TRACE_LOCKS
;
...
@@ -1283,6 +1280,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
...
@@ -1283,6 +1280,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
TPRINTF
(
trace_flag
,
"LockReleaseAll: lockmethod=%d, pid=%d"
,
TPRINTF
(
trace_flag
,
"LockReleaseAll: lockmethod=%d, pid=%d"
,
lockmethod
,
MyProcPid
);
lockmethod
,
MyProcPid
);
nleft
=
0
;
Assert
(
lockmethod
<
NumLockMethods
);
Assert
(
lockmethod
<
NumLockMethods
);
lockMethodTable
=
LockMethodTable
[
lockmethod
];
lockMethodTable
=
LockMethodTable
[
lockmethod
];
if
(
!
lockMethodTable
)
if
(
!
lockMethodTable
)
...
@@ -1304,16 +1303,6 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
...
@@ -1304,16 +1303,6 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
{
{
bool
wakeupNeeded
=
false
;
bool
wakeupNeeded
=
false
;
/*
* Sometimes the queue appears to be messed up.
*/
if
(
count
++
>
1000
)
{
elog
(
NOTICE
,
"LockReleaseAll: xid loop detected, giving up"
);
nleft
=
0
;
break
;
}
/* ---------------------------
/* ---------------------------
* XXX Here we assume the shared memory queue is circular and
* XXX Here we assume the shared memory queue is circular and
* that we know its internal structure. Should have some sort of
* that we know its internal structure. Should have some sort of
...
@@ -1485,9 +1474,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
...
@@ -1485,9 +1474,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
ProcLockWakeup
(
waitQueue
,
lockmethod
,
lock
);
ProcLockWakeup
(
waitQueue
,
lockmethod
,
lock
);
}
}
#ifdef USER_LOCKS
next_item:
next_item:
#endif
if
(
done
)
if
(
done
)
break
;
break
;
SHMQueueFirst
(
&
xidLook
->
queue
,
(
Pointer
*
)
&
tmp
,
&
tmp
->
queue
);
SHMQueueFirst
(
&
xidLook
->
queue
,
(
Pointer
*
)
&
tmp
,
&
tmp
->
queue
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment