Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e0095c6c
Commit
e0095c6c
authored
Apr 30, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove bogus 'xid loop detected' check, which actually wasn't detecting
loops, but just arbitrarily failing at 1000 locks.
parent
2f19d11f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
21 deletions
+8
-21
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+8
-21
No files found.
src/backend/storage/lmgr/lock.c
View file @
e0095c6c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.6
6 2000/02/22 09:55:20 inoue
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.6
7 2000/04/30 21:23:31 tgl
Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
...
...
@@ -492,14 +492,14 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
int
is_user_lock
;
is_user_lock
=
(
lockmethod
==
USER_LOCKMETHOD
);
#ifdef USER_LOCKS_DEBUG
if
(
is_user_lock
)
{
#ifdef USER_LOCKS_DEBUG
TPRINTF
(
TRACE_USERLOCKS
,
"LockAcquire: user lock [%u] %s"
,
locktag
->
objId
.
blkno
,
lock_types
[
lockmode
]);
#endif
}
#endif
#endif
/* ???????? This must be changed when short term locks will be used */
...
...
@@ -1266,14 +1266,11 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
LOCK
*
lock
;
bool
found
;
int
trace_flag
;
int
xidtag_lockmethod
;
#ifdef USER_LOCKS
int
is_user_lock_table
,
count
,
int
xidtag_lockmethod
,
nleft
;
count
=
nleft
=
0
;
#ifdef USER_LOCKS
int
is_user_lock_table
;
is_user_lock_table
=
(
lockmethod
==
USER_LOCKMETHOD
);
trace_flag
=
(
lockmethod
==
2
)
?
TRACE_USERLOCKS
:
TRACE_LOCKS
;
...
...
@@ -1283,6 +1280,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
TPRINTF
(
trace_flag
,
"LockReleaseAll: lockmethod=%d, pid=%d"
,
lockmethod
,
MyProcPid
);
nleft
=
0
;
Assert
(
lockmethod
<
NumLockMethods
);
lockMethodTable
=
LockMethodTable
[
lockmethod
];
if
(
!
lockMethodTable
)
...
...
@@ -1304,16 +1303,6 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
{
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
* that we know its internal structure. Should have some sort of
...
...
@@ -1485,9 +1474,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
ProcLockWakeup
(
waitQueue
,
lockmethod
,
lock
);
}
#ifdef USER_LOCKS
next_item:
#endif
if
(
done
)
break
;
SHMQueueFirst
(
&
xidLook
->
queue
,
(
Pointer
*
)
&
tmp
,
&
tmp
->
queue
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment