projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c291503
)
Fix XLogReadBufferForRedoExtended to get cleanup lock when asked to do so.
author
Heikki Linnakangas
Thu, 13 Nov 2014 15:54:20 +0000
(17:54 +0200)
committer
Heikki Linnakangas
Thu, 13 Nov 2014 15:54:20 +0000
(17:54 +0200)
src/backend/access/transam/xlogutils.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/transam/xlogutils.c
b/src/backend/access/transam/xlogutils.c
index 1a21dac85382ed991a11603e62bccab9745e5ae1..da0e45bfcc6b1f065684384df2c8193882634f6c 100644
(file)
--- a/
src/backend/access/transam/xlogutils.c
+++ b/
src/backend/access/transam/xlogutils.c
@@
-312,7
+312,10
@@
XLogReadBufferForRedoExtended(XLogRecPtr lsn, XLogRecord *record,
*buf = XLogReadBufferExtended(rnode, forkno, blkno, mode);
if (BufferIsValid(*buf))
{
- LockBuffer(*buf, BUFFER_LOCK_EXCLUSIVE);
+ if (get_cleanup_lock)
+ LockBufferForCleanup(*buf);
+ else
+ LockBuffer(*buf, BUFFER_LOCK_EXCLUSIVE);
if (lsn <= PageGetLSN(BufferGetPage(*buf)))
return BLK_DONE;
else