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: Update FSM in COPY FREEZE replay
Date: Mon, 14 Sep 2026 16:00:48 +0000
Message-ID: <E1x696u-00000000JAc-0cD4@gemulon.postgresql.org> (raw)
Update FSM in COPY FREEZE replay
d96f87332b3 folded COPY FREEZE visibility map updates into
XLOG_HEAP2_MULTI_INSERT records. Unlike the former XLOG_HEAP2_VISIBLE
redo path, multi-insert redo only updated the FSM when the record did
not contain a heap page FPI and the heap page had less than 20% free
space.
This can leave all-frozen pages with missing or stale FSM entries on a
standby. After promotion, vacuum will skip those pages, preventing
their free space from being discovered.
When a multi-insert record sets the page all-frozen, record the heap
page's free space unconditionally.
Reported-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/CAAKRu_bS3nfMJCF2fjE%2Bceb5-t%3D2p_VPMk2PWuVomrOFxg5DGQ%40mail.gmail.com
Backpatch-through: 19
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f4b511ae93a587982ac025c7a2512586fe87489d
Modified Files
--------------
src/backend/access/heap/heapam_xlog.c | 46 ++++++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 14 deletions(-)
view thread (2+ messages)
Message-ID: <E1x696u-00000000JAc-0cD4@gemulon.postgresql.org>
Permalink: ../E1x696u-00000000JAc-0cD4@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x696u-00000000JAc-0cD4@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: Update FSM in COPY FREEZE replay
In-Reply-To: <E1x696u-00000000JAc-0cD4@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