agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid setting pd_prune_xid when inserting frozen tuples
Date: Mon, 14 Sep 2026 14:44:47 +0000
Message-ID: <E1x67vL-00000000IcJ-0Pvs@gemulon.postgresql.org> (raw)
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 <melanieplageman@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
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(-)
view thread (2+ messages) latest in thread
Message-ID: <E1x67vL-00000000IcJ-0Pvs@gemulon.postgresql.org>
Permalink: ../E1x67vL-00000000IcJ-0Pvs@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x67vL-00000000IcJ-0Pvs@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Avoid setting pd_prune_xid when inserting frozen tuples
In-Reply-To: <E1x67vL-00000000IcJ-0Pvs@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox