agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Update FSM in COPY FREEZE replay 2+ messages / 1 participants [nested] [flat]
* pgsql: Update FSM in COPY FREEZE replay @ 2026-09-14 15:59 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Melanie Plageman @ 2026-09-14 15:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f7700080dc4c9226dd0fd81795214c02635e474d Modified Files -------------- src/backend/access/heap/heapam_xlog.c | 46 ++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 14 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Update FSM in COPY FREEZE replay @ 2026-09-14 16:00 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Melanie Plageman @ 2026-09-14 16:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-09-14 16:00 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-09-14 15:59 pgsql: Update FSM in COPY FREEZE replay Melanie Plageman <melanieplageman@gmail.com> 2026-09-14 16:00 pgsql: Update FSM in COPY FREEZE replay Melanie Plageman <melanieplageman@gmail.com>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox