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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/47f0fa62c00d32d8b8be41d052775c07c90024db Modified Files -------------- src/backend/access/heap/heapam.c | 6 +++--- src/backend/access/heap/heapam_xlog.c | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-)
