Fix ReadBuffer() to correctly handle the case where it's trying to extend
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 6 Jan 2006 00:04:33 +0000 (00:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 6 Jan 2006 00:04:33 +0000 (00:04 +0000)
commit3366bd81d56f99e74ae88f0673bbd8ac059b1af1
tree3dc36c39f0c95f3a4ffe69cab8eeb7137fb094bb
parent24c0adbdac0a7a6c618bba2bcbb1b5a469098980
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.)
src/backend/storage/buffer/bufmgr.c