pgsql: Fix ReadBuffer() to correctly handle the case where it's trying - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix ReadBuffer() to correctly handle the case where it's trying
Date
Msg-id 20060106000426.686F09DCA5F@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix ReadBuffer() to correctly handle the case where it's trying to extend
the relation but it finds a pre-existing valid buffer.  The buffer does not
correspond to any page known to the kernel, so we *must* do smgrextend to
ensure that the space becomes allocated.  The 7.x branches all do this
correctly, but the corner case got lost somewhere during 8.0 bufmgr rewrites.
(My fault no doubt :-( ... I think I assumed that such a buffer must be
not-BM_VALID, which is not so.)

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/storage/buffer:
        bufmgr.c (r1.198.2.2 -> r1.198.2.3)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/bufmgr.c.diff?r1=1.198.2.2&r2=1.198.2.3)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix ReadBuffer() to correctly handle the case where it's trying
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix ReadBuffer() to correctly handle the case where it's trying