Content-Length: 262479 | pFad | http://github.com/postgrespro/postgres/commit/34402ae351e71f852a6c2fee7861a66d0dbeb24c

46 Fix XLogReadBufferForRedoExtended to get cleanup lock when asked to d… · postgrespro/postgres@34402ae · GitHub
Skip to content

Commit 34402ae

Browse files
committed
Fix XLogReadBufferForRedoExtended to get cleanup lock when asked to do so.
1 parent c291503 commit 34402ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/access/transam/xlogutils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ XLogReadBufferForRedoExtended(XLogRecPtr lsn, XLogRecord *record,
312312
*buf = XLogReadBufferExtended(rnode, forkno, blkno, mode);
313313
if (BufferIsValid(*buf))
314314
{
315-
LockBuffer(*buf, BUFFER_LOCK_EXCLUSIVE);
315+
if (get_cleanup_lock)
316+
LockBufferForCleanup(*buf);
317+
else
318+
LockBuffer(*buf, BUFFER_LOCK_EXCLUSIVE);
316319
if (lsn <= PageGetLSN(BufferGetPage(*buf)))
317320
return BLK_DONE;
318321
else

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/34402ae351e71f852a6c2fee7861a66d0dbeb24c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy