On Tue, Dec 2, 2025 at 1:41 PM Andres Freund <[email protected]> wrote: > > On December 2, 2025 1:23:57 PM EST, Melanie Plageman > <[email protected]> wrote: > > >What about on-access pruning during SELECT queries on a hot standby? > > There's no on-access-pruning on the hot standby itself, it'd lead to > divergence between primary and standby (and you couldn't WAL log it).
Ah, right. > Therefore it doesn't seem important what we set the prune XID to. Any > valid XID that's not in the future should do the trick. So how about > adding a boolean flag to the WAL record, to indicate whether there's > anything prunable left on the page or not? We could add a flag to xl_heap_prune flags (which is now a uint16 and thus has room) to indicate that there are prunable tuples. In terms of finding some XID to set it to, could we do what updates and deletes do and use the XLogRecord->xl_xid? - Melanie
