Avoid setting pd_prune_xid when inserting frozen tuples 378a216187a set pd_prune_xid on inserts so that on-access pruning could later set the pages all-visible. heap_multi_insert() skipped this only when setting the page all-frozen, but it can insert frozen tuples even when not setting the page all-frozen. Inserting frozen tuples should not set pd_prune_xid as they introduce no work for on-access pruning. Fix by only setting pd_prune_xid when inserting non-frozen tuples.
Reported-by: Melanie Plageman <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/CAAKRu_a02pu7U2S0qPZ5L%2BoWb2m2Zp965sOKCCLnKUAKNo-hfg%40mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/41a8548ad41854d88578aebcfdf54bbdca42d49e Modified Files -------------- src/backend/access/heap/heapam.c | 6 +++--- src/backend/access/heap/heapam_xlog.c | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-)
