Yeah, it's definitely a HOT-introdued thing. Vacuum calls heap_page_prune on every page, and this in heap_page_prune is dirtying the buffer:
> else > { > /* > * If we didn't prune anything, we have nonetheless updated the > * pd_prune_xid field; treat this as a non-WAL-logged hint. > */ > SetBufferCommitInfoNeedsSave(buffer); > }
I don't have time to dig deeper at this moment. I'll take a look later today, unless someone beats me to it. We obviously don't want to call SetBufferCommitInfoNeedsSave if we didn't really change the pd_prune_xid field.
I am looking at it. We must not call SetBufferCommitInfoNeedsSave unless we make any state changes to the page.