Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 50e3c60

Browse files
author
Hiroshi Inoue
committed
Avoid 'FATAL: out of free buffers: time to abort !" error
during WAL recovery. Recovery failure is always serious.
1 parent b200d09 commit 50e3c60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/transam/xlogutils.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ XLogReadBuffer(bool extend, Relation reln, BlockNumber blkno)
198198
Assert(InRecovery);
199199
while (lastblock <= blkno)
200200
{
201+
if (buffer != InvalidBuffer)
202+
ReleaseBuffer(buffer); /* must be WriteBuffer()? */
201203
buffer = ReadBuffer(reln, P_NEW);
202204
lastblock++;
203205
}

0 commit comments

Comments
 (0)