pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Forget invalid VM pages during truncation replay 4+ messages / 1 participants [nested] [flat]
* pgsql: Forget invalid VM pages during truncation replay @ 2026-11-19 22:16 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 4+ messages in thread From: Melanie Plageman @ 2026-11-19 22:16 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Forget invalid VM pages during truncation replay Commit ed62d26caca made heap records that clear visibility map bits register VM blocks, causing redo to read those blocks with RBM_NORMAL. If such a record is replayed after the VM fork was already truncated on disk, recovery records a missing-page reference. Replaying the truncation only forgot missing pages from the main fork, so recovery later PANICs with unresolved invalid pages. Call XLogTruncateRelation() for the VM fork when replaying a VM truncation. Reported-by: Jacky Nguyen <nktpro@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Shihao Zhong <zhong950419@gmail.com> Reviewed-by: Rahul Yadav <rahul@rhyadav.dev> Discussion: https://postgr.es/m/CAL4mQLAp562c1rCgg2Dqx6TBSdOk6vOvaLFjwFG9E6k4uwvJJw%40mail.gmail.com Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c266e204a7ab76f79178ed94aa2f679def0bff9d Modified Files -------------- .../pg_visibility/t/001_concurrent_transaction.pl | 51 +++++++++++++++++++++- src/backend/catalog/storage.c | 12 ++++- 2 files changed, 60 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Forget invalid VM pages during truncation replay @ 2026-11-19 22:17 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 4+ messages in thread From: Melanie Plageman @ 2026-11-19 22:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Forget invalid VM pages during truncation replay Commit ed62d26caca made heap records that clear visibility map bits register VM blocks, causing redo to read those blocks with RBM_NORMAL. If such a record is replayed after the VM fork was already truncated on disk, recovery records a missing-page reference. Replaying the truncation only forgot missing pages from the main fork, so recovery later PANICs with unresolved invalid pages. Call XLogTruncateRelation() for the VM fork when replaying a VM truncation. Reported-by: Jacky Nguyen <nktpro@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Shihao Zhong <zhong950419@gmail.com> Reviewed-by: Rahul Yadav <rahul@rhyadav.dev> Discussion: https://postgr.es/m/CAL4mQLAp562c1rCgg2Dqx6TBSdOk6vOvaLFjwFG9E6k4uwvJJw%40mail.gmail.com Backpatch-through: 17 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/aa3e00984ea79703536f1311f748f5c27496f2d4 Modified Files -------------- .../pg_visibility/t/001_concurrent_transaction.pl | 51 +++++++++++++++++++++- src/backend/catalog/storage.c | 12 ++++- 2 files changed, 60 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Forget invalid VM pages during truncation replay @ 2026-11-19 22:18 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 4+ messages in thread From: Melanie Plageman @ 2026-11-19 22:18 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Forget invalid VM pages during truncation replay Commit ed62d26caca made heap records that clear visibility map bits register VM blocks, causing redo to read those blocks with RBM_NORMAL. If such a record is replayed after the VM fork was already truncated on disk, recovery records a missing-page reference. Replaying the truncation only forgot missing pages from the main fork, so recovery later PANICs with unresolved invalid pages. Call XLogTruncateRelation() for the VM fork when replaying a VM truncation. Reported-by: Jacky Nguyen <nktpro@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Shihao Zhong <zhong950419@gmail.com> Reviewed-by: Rahul Yadav <rahul@rhyadav.dev> Discussion: https://postgr.es/m/CAL4mQLAp562c1rCgg2Dqx6TBSdOk6vOvaLFjwFG9E6k4uwvJJw%40mail.gmail.com Backpatch-through: 17 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/362c66ff9bb14d43d012896e16cb1aff1054b52d Modified Files -------------- .../pg_visibility/t/001_concurrent_transaction.pl | 51 +++++++++++++++++++++- src/backend/catalog/storage.c | 12 ++++- 2 files changed, 60 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Forget invalid VM pages during truncation replay @ 2026-11-19 22:22 Melanie Plageman <melanieplageman@gmail.com> 0 siblings, 0 replies; 4+ messages in thread From: Melanie Plageman @ 2026-11-19 22:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Forget invalid VM pages during truncation replay Commit ed62d26caca made heap records that clear visibility map bits register VM blocks, causing redo to read those blocks with RBM_NORMAL. If such a record is replayed after the VM fork was already truncated on disk, recovery records a missing-page reference. Replaying the truncation only forgot missing pages from the main fork, so recovery later PANICs with unresolved invalid pages. Call XLogTruncateRelation() for the VM fork when replaying a VM truncation. Reported-by: Jacky Nguyen <nktpro@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Shihao Zhong <zhong950419@gmail.com> Reviewed-by: Rahul Yadav <rahul@rhyadav.dev> Discussion: https://postgr.es/m/CAL4mQLAp562c1rCgg2Dqx6TBSdOk6vOvaLFjwFG9E6k4uwvJJw%40mail.gmail.com Backpatch-through: 17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/abfd5b9d95a05be64bf2b390afaf304f9e147051 Modified Files -------------- .../pg_visibility/t/001_concurrent_transaction.pl | 62 ++++++++++++++++++++-- src/backend/catalog/storage.c | 12 ++++- 2 files changed, 69 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-11-19 22:22 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-19 22:16 pgsql: Forget invalid VM pages during truncation replay Melanie Plageman <melanieplageman@gmail.com> 2026-11-19 22:17 pgsql: Forget invalid VM pages during truncation replay Melanie Plageman <melanieplageman@gmail.com> 2026-11-19 22:18 pgsql: Forget invalid VM pages during truncation replay Melanie Plageman <melanieplageman@gmail.com> 2026-11-19 22:22 pgsql: Forget invalid VM pages during truncation replay Melanie Plageman <melanieplageman@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox