"Tom Lane" <tgl@sss.pgh.pa.us> writes:
>
> This is entirely likely to find the same non-BM_VALID buffer that was
> assigned in the first iteration.
>
So after we found it, we still need to extend the file. In ReadBuffer():
---/* if it was already in the buffer pool, we're done */if (found){ ... return BufferDescriptorGetBuffer(bufHdr);}
/* ... so future attempts ... come right back here to * try smgrextend again. */
---
Shall we write
/* If it was already in the buffer pool and not for extension, we're
done */ if (found && !isExtend)
instead?
Regards,
Qingqing