]> granicus.if.org Git - postgresql/commitdiff
Avoid 'FATAL: out of free buffers: time to abort !" error
authorHiroshi Inoue <inoue@tpf.co.jp>
Thu, 22 Feb 2001 08:59:40 +0000 (08:59 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Thu, 22 Feb 2001 08:59:40 +0000 (08:59 +0000)
during WAL recovery.  Recovery failure is always serious.

src/backend/access/transam/xlogutils.c

index 6ff51d01fd413dfb0dc13eea3e92e617c7357404..8735db1ae1c577d62a5a707d166b4bbe31b5ac3d 100644 (file)
@@ -198,6 +198,8 @@ XLogReadBuffer(bool extend, Relation reln, BlockNumber blkno)
                        Assert(InRecovery);
                        while (lastblock <= blkno)
                        {
+                               if (buffer != InvalidBuffer)
+                                        ReleaseBuffer(buffer); /* must be WriteBuffer()? */
                                buffer = ReadBuffer(reln, P_NEW);
                                lastblock++;
                        }