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
3b79cc0c
Commit
3b79cc0c
authored
Jun 11, 1999
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed bad Assert(!buf->ri_lock) when unlocking exclusively
locked buffer.
parent
4ca7b4d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+19
-6
No files found.
src/backend/storage/buffer/bufmgr.c
View file @
3b79cc0c
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.5
4 1999/06/10 14:17:09
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.5
5 1999/06/11 09:00:02
vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1960,7 +1960,12 @@ UnlockBuffers()
}
if
(
BufferLocks
[
i
]
&
BL_RI_LOCK
)
{
Assert
(
buf
->
ri_lock
);
/*
* Someone else could remove our RI lock when acquiring
* W lock. This is possible if we came here from elog(ERROR)
* from IpcSemaphore{Lock|Unlock}(WaitCLSemId). And so we
* don't do Assert(buf->ri_lock) here.
*/
buf
->
ri_lock
=
false
;
}
if
(
BufferLocks
[
i
]
&
BL_W_LOCK
)
...
...
@@ -2008,7 +2013,6 @@ LockBuffer(Buffer buffer, int mode)
{
Assert
(
buf
->
w_lock
);
Assert
(
buf
->
r_locks
==
0
);
Assert
(
!
buf
->
ri_lock
);
Assert
(
!
(
BufferLocks
[
buffer
-
1
]
&
(
BL_R_LOCK
|
BL_RI_LOCK
)))
buf
->
w_lock
=
false
;
BufferLocks
[
buffer
-
1
]
&=
~
BL_W_LOCK
;
...
...
@@ -2043,10 +2047,15 @@ LockBuffer(Buffer buffer, int mode)
Assert
(
!
(
BufferLocks
[
buffer
-
1
]
&
(
BL_R_LOCK
|
BL_W_LOCK
|
BL_RI_LOCK
)));
while
(
buf
->
r_locks
>
0
||
buf
->
w_lock
)
{
if
(
buf
->
r_locks
>
3
)
if
(
buf
->
r_locks
>
3
||
(
BufferLocks
[
buffer
-
1
]
&
BL_RI_LOCK
)
)
{
if
(
!
(
BufferLocks
[
buffer
-
1
]
&
BL_RI_LOCK
))
BufferLocks
[
buffer
-
1
]
|=
BL_RI_LOCK
;
/*
* Our RI lock might be removed by concurrent W lock
* acquiring (see what we do with RI locks below
* when our own W acquiring succeeded) and so
* we set RI lock again if we already did this.
*/
BufferLocks
[
buffer
-
1
]
|=
BL_RI_LOCK
;
buf
->
ri_lock
=
true
;
}
#ifdef HAS_TEST_AND_SET
...
...
@@ -2063,6 +2072,10 @@ LockBuffer(Buffer buffer, int mode)
BufferLocks
[
buffer
-
1
]
|=
BL_W_LOCK
;
if
(
BufferLocks
[
buffer
-
1
]
&
BL_RI_LOCK
)
{
/*
* It's possible to remove RI locks acquired by another
* W lockers here, but they'll take care about it.
*/
buf
->
ri_lock
=
false
;
BufferLocks
[
buffer
-
1
]
&=
~
BL_RI_LOCK
;
}
...
...
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