pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid trying to write an empty WAL record in log_newpage_range() 6+ messages / 1 participants [nested] [flat]
* pgsql: Avoid trying to write an empty WAL record in log_newpage_range() @ 2023-04-17 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-04-17 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid trying to write an empty WAL record in log_newpage_range(). If the last few pages in the specified range are empty (all zero), then log_newpage_range() could try to emit an empty WAL record containing no FPIs. This at least upsets an Assert in ReserveXLogInsertLocation, and might perhaps have bad real-world consequences in non-assert builds. This has been broken since log_newpage_range() was introduced, but the case was hard if not impossible to hit before commit 3d6a98457 decided it was okay to leave VM and FSM pages intentionally zero. Nonetheless, it seems prudent to back-patch. log_newpage_range() was added in v12 but later back-patched, so this affects all supported branches. Matthias van de Meent, per report from Justin Pryzby Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9b0c1f2137fba0292b772b98b5fbccb86aedb336 Modified Files -------------- src/backend/access/transam/xloginsert.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid trying to write an empty WAL record in log_newpage_range() @ 2023-04-17 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-04-17 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid trying to write an empty WAL record in log_newpage_range(). If the last few pages in the specified range are empty (all zero), then log_newpage_range() could try to emit an empty WAL record containing no FPIs. This at least upsets an Assert in ReserveXLogInsertLocation, and might perhaps have bad real-world consequences in non-assert builds. This has been broken since log_newpage_range() was introduced, but the case was hard if not impossible to hit before commit 3d6a98457 decided it was okay to leave VM and FSM pages intentionally zero. Nonetheless, it seems prudent to back-patch. log_newpage_range() was added in v12 but later back-patched, so this affects all supported branches. Matthias van de Meent, per report from Justin Pryzby Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c796d7296978e1ac09bcbb41c9230b6cc32b7d44 Modified Files -------------- src/backend/access/transam/xloginsert.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid trying to write an empty WAL record in log_newpage_range() @ 2023-04-17 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-04-17 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid trying to write an empty WAL record in log_newpage_range(). If the last few pages in the specified range are empty (all zero), then log_newpage_range() could try to emit an empty WAL record containing no FPIs. This at least upsets an Assert in ReserveXLogInsertLocation, and might perhaps have bad real-world consequences in non-assert builds. This has been broken since log_newpage_range() was introduced, but the case was hard if not impossible to hit before commit 3d6a98457 decided it was okay to leave VM and FSM pages intentionally zero. Nonetheless, it seems prudent to back-patch. log_newpage_range() was added in v12 but later back-patched, so this affects all supported branches. Matthias van de Meent, per report from Justin Pryzby Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2207df7c34bfcecec33da2a47068e94d7882ffdb Modified Files -------------- src/backend/access/transam/xloginsert.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid trying to write an empty WAL record in log_newpage_range() @ 2023-04-17 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-04-17 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid trying to write an empty WAL record in log_newpage_range(). If the last few pages in the specified range are empty (all zero), then log_newpage_range() could try to emit an empty WAL record containing no FPIs. This at least upsets an Assert in ReserveXLogInsertLocation, and might perhaps have bad real-world consequences in non-assert builds. This has been broken since log_newpage_range() was introduced, but the case was hard if not impossible to hit before commit 3d6a98457 decided it was okay to leave VM and FSM pages intentionally zero. Nonetheless, it seems prudent to back-patch. log_newpage_range() was added in v12 but later back-patched, so this affects all supported branches. Matthias van de Meent, per report from Justin Pryzby Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3e383f9b68f13502789b234c2dc3274958bdbf78 Modified Files -------------- src/backend/access/transam/xloginsert.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid trying to write an empty WAL record in log_newpage_range() @ 2023-04-17 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-04-17 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid trying to write an empty WAL record in log_newpage_range(). If the last few pages in the specified range are empty (all zero), then log_newpage_range() could try to emit an empty WAL record containing no FPIs. This at least upsets an Assert in ReserveXLogInsertLocation, and might perhaps have bad real-world consequences in non-assert builds. This has been broken since log_newpage_range() was introduced, but the case was hard if not impossible to hit before commit 3d6a98457 decided it was okay to leave VM and FSM pages intentionally zero. Nonetheless, it seems prudent to back-patch. log_newpage_range() was added in v12 but later back-patched, so this affects all supported branches. Matthias van de Meent, per report from Justin Pryzby Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/86874a6dfc8b1878bede18437b1709fbe485a911 Modified Files -------------- src/backend/access/transam/xloginsert.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid trying to write an empty WAL record in log_newpage_range() @ 2023-04-17 18:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2023-04-17 18:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid trying to write an empty WAL record in log_newpage_range(). If the last few pages in the specified range are empty (all zero), then log_newpage_range() could try to emit an empty WAL record containing no FPIs. This at least upsets an Assert in ReserveXLogInsertLocation, and might perhaps have bad real-world consequences in non-assert builds. This has been broken since log_newpage_range() was introduced, but the case was hard if not impossible to hit before commit 3d6a98457 decided it was okay to leave VM and FSM pages intentionally zero. Nonetheless, it seems prudent to back-patch. log_newpage_range() was added in v12 but later back-patched, so this affects all supported branches. Matthias van de Meent, per report from Justin Pryzby Discussion: https://postgr.es/m/ZD1daibg4RF50IOj@telsasoft.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/72a914e9fb7353e17776a2692fb21cff49725400 Modified Files -------------- src/backend/access/transam/xloginsert.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-04-17 18:22 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-04-17 18:22 pgsql: Avoid trying to write an empty WAL record in log_newpage_range() Tom Lane <tgl@sss.pgh.pa.us> 2023-04-17 18:22 pgsql: Avoid trying to write an empty WAL record in log_newpage_range() Tom Lane <tgl@sss.pgh.pa.us> 2023-04-17 18:22 pgsql: Avoid trying to write an empty WAL record in log_newpage_range() Tom Lane <tgl@sss.pgh.pa.us> 2023-04-17 18:22 pgsql: Avoid trying to write an empty WAL record in log_newpage_range() Tom Lane <tgl@sss.pgh.pa.us> 2023-04-17 18:22 pgsql: Avoid trying to write an empty WAL record in log_newpage_range() Tom Lane <tgl@sss.pgh.pa.us> 2023-04-17 18:22 pgsql: Avoid trying to write an empty WAL record in log_newpage_range() Tom Lane <tgl@sss.pgh.pa.us>
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