> On Thu, Sep 18, 2025 at 10:25:29AM +0530, Ashutosh Bapat wrote: > Given these things, I think we should set up the buffer lookup table > to hold maximum entries required to expand the buffer pool to its > maximum, right at the beginning.
Thanks for investigating. I think another option would be to rebuild the buffer lookup table (create a new table based on the new size and copy the data over from the original one) as part of the resize procedure, alongsize with buffers eviction and initialization. From what I recall the size of buffer lookup table is about two orders of magnitude lower than shared buffers, so the overhead should not be that large even for significant amount of buffers.
