mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Avoid 'FATAL: out of free buffers: time to abort !" error
during WAL recovery. Recovery failure is always serious.
This commit is contained in:
@ -198,6 +198,8 @@ XLogReadBuffer(bool extend, Relation reln, BlockNumber blkno)
|
|||||||
Assert(InRecovery);
|
Assert(InRecovery);
|
||||||
while (lastblock <= blkno)
|
while (lastblock <= blkno)
|
||||||
{
|
{
|
||||||
|
if (buffer != InvalidBuffer)
|
||||||
|
ReleaseBuffer(buffer); /* must be WriteBuffer()? */
|
||||||
buffer = ReadBuffer(reln, P_NEW);
|
buffer = ReadBuffer(reln, P_NEW);
|
||||||
lastblock++;
|
lastblock++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user