Hi Palak,

> Changed both the precheck and the locked assertion to BM_TAG_VALID

I missed a race in my earlier suggestion. Restricting new allocations
does not prevent another backend from invalidating an existing buffer.
For example, DROP TABLE can clear the tag between the unlocked precheck
and LockBufHdr(), causing the assertion to fail.

Could we recheck BM_TAG_VALID under the lock, and unlock and continue
if it is already clear?

Also, the earlier comment in 0012 still says "We do not consider the
current end of the structure". That is no longer true for shrinking.

Best regards,
Yuhang Qiu



Reply via email to