On Thu, Sep 10, 2026 at 11:03 PM Chao Li <[email protected]> wrote:
>
> > <v1-0001-Make-on-access-pruning-pin-visibility-map-before-.patch>
>
> Looks reasonable to me to move visibilitymap_pin to before 
> ConditionalLockBufferForCleanup. I saw the header comment of of 
> visibilitymap_pin explicitly says that "Because that can require I/O to read 
> the map page, you shouldn't hold a lock on the heap page while doing that.”.

Yea, that was my bad.

> I was thinking if we should unpin when ConditionalLockBufferForCleanup fails, 
> but the new comment seems to resolve my confusion, because next heap page may 
> map the same VM page.

Yea, we can most likely reuse it for the next page, so better not to
release it. It'll be cleaned upat the end of the query or if before
pinning a different page of the VM.

> So v1 LGTM.

Thanks. I've pushed it

- Melanie


Reply via email to