pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix pg_upgrade around multixid and mxoff wraparound 5+ messages / 1 participants [nested] [flat]
* pgsql: Fix pg_upgrade around multixid and mxoff wraparound @ 2025-11-12 11:13 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 5+ messages in thread From: Heikki Linnakangas @ 2025-11-12 11:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_upgrade around multixid and mxoff wraparound pg_resetwal didn't accept multixid 0 or multixact offset UINT32_MAX, but they are both valid values that can appear in the control file. That caused pg_upgrade to fail if you tried to upgrade a cluster exactly at multixid or offset wraparound, because pg_upgrade calls pg_resetwal to restore multixid/offset on the new cluster to the values from the old cluster. To fix, allow those values in pg_resetwal. Fixes bugs #18863 and #18865 reported by Dmitry Kovalenko. Backpatch down to v15. Version 14 has the same bug, but the patch doesn't apply cleanly there. It could be made to work but it doesn't seem worth the effort given how rare it is to hit this problem with pg_upgrade, and how few people are upgrading to v14 anymore. Author: Maxim Orlov <orlovmg@gmail.com> Discussion: https://www.postgresql.org/message-id/CACG%3DezaApSMTjd%3DM2Sfn5Ucuggd3FG8Z8Qte8Xq9k5-%2BRQis-g@mail... Discussion: https://www.postgresql.org/message-id/18863-72f08858855344a2@postgresql.org Discussion: https://www.postgresql.org/message-id/18865-d4c66cf35c2a67af@postgresql.org Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/94939c5f3ab0a390e52c0802c7141c42673a48b4 Modified Files -------------- src/bin/pg_resetwal/pg_resetwal.c | 25 +++++++++++++++---------- src/bin/pg_resetwal/t/001_basic.pl | 12 +++++++----- 2 files changed, 22 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_upgrade around multixid and mxoff wraparound @ 2025-11-12 11:13 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 5+ messages in thread From: Heikki Linnakangas @ 2025-11-12 11:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_upgrade around multixid and mxoff wraparound pg_resetwal didn't accept multixid 0 or multixact offset UINT32_MAX, but they are both valid values that can appear in the control file. That caused pg_upgrade to fail if you tried to upgrade a cluster exactly at multixid or offset wraparound, because pg_upgrade calls pg_resetwal to restore multixid/offset on the new cluster to the values from the old cluster. To fix, allow those values in pg_resetwal. Fixes bugs #18863 and #18865 reported by Dmitry Kovalenko. Backpatch down to v15. Version 14 has the same bug, but the patch doesn't apply cleanly there. It could be made to work but it doesn't seem worth the effort given how rare it is to hit this problem with pg_upgrade, and how few people are upgrading to v14 anymore. Author: Maxim Orlov <orlovmg@gmail.com> Discussion: https://www.postgresql.org/message-id/CACG%3DezaApSMTjd%3DM2Sfn5Ucuggd3FG8Z8Qte8Xq9k5-%2BRQis-g@mail... Discussion: https://www.postgresql.org/message-id/18863-72f08858855344a2@postgresql.org Discussion: https://www.postgresql.org/message-id/18865-d4c66cf35c2a67af@postgresql.org Backpatch-through: 15 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8747b969fd8be79541f6e3cdb99e1b425fd9ad47 Modified Files -------------- src/bin/pg_resetwal/pg_resetwal.c | 25 +++++++++++++++---------- src/bin/pg_resetwal/t/001_basic.pl | 12 +++++++----- 2 files changed, 22 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_upgrade around multixid and mxoff wraparound @ 2025-11-12 11:13 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 5+ messages in thread From: Heikki Linnakangas @ 2025-11-12 11:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_upgrade around multixid and mxoff wraparound pg_resetwal didn't accept multixid 0 or multixact offset UINT32_MAX, but they are both valid values that can appear in the control file. That caused pg_upgrade to fail if you tried to upgrade a cluster exactly at multixid or offset wraparound, because pg_upgrade calls pg_resetwal to restore multixid/offset on the new cluster to the values from the old cluster. To fix, allow those values in pg_resetwal. Fixes bugs #18863 and #18865 reported by Dmitry Kovalenko. Backpatch down to v15. Version 14 has the same bug, but the patch doesn't apply cleanly there. It could be made to work but it doesn't seem worth the effort given how rare it is to hit this problem with pg_upgrade, and how few people are upgrading to v14 anymore. Author: Maxim Orlov <orlovmg@gmail.com> Discussion: https://www.postgresql.org/message-id/CACG%3DezaApSMTjd%3DM2Sfn5Ucuggd3FG8Z8Qte8Xq9k5-%2BRQis-g@mail... Discussion: https://www.postgresql.org/message-id/18863-72f08858855344a2@postgresql.org Discussion: https://www.postgresql.org/message-id/18865-d4c66cf35c2a67af@postgresql.org Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cb2ef0e92edb9710e599d0a8b1f850fb46859787 Modified Files -------------- src/bin/pg_resetwal/pg_resetwal.c | 25 +++++++++++++++---------- src/bin/pg_resetwal/t/001_basic.pl | 12 +++++++----- 2 files changed, 22 insertions(+), 15 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_upgrade around multixid and mxoff wraparound @ 2025-11-12 11:13 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 5+ messages in thread From: Heikki Linnakangas @ 2025-11-12 11:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_upgrade around multixid and mxoff wraparound pg_resetwal didn't accept multixid 0 or multixact offset UINT32_MAX, but they are both valid values that can appear in the control file. That caused pg_upgrade to fail if you tried to upgrade a cluster exactly at multixid or offset wraparound, because pg_upgrade calls pg_resetwal to restore multixid/offset on the new cluster to the values from the old cluster. To fix, allow those values in pg_resetwal. Fixes bugs #18863 and #18865 reported by Dmitry Kovalenko. Backpatch down to v15. Version 14 has the same bug, but the patch doesn't apply cleanly there. It could be made to work but it doesn't seem worth the effort given how rare it is to hit this problem with pg_upgrade, and how few people are upgrading to v14 anymore. Author: Maxim Orlov <orlovmg@gmail.com> Discussion: https://www.postgresql.org/message-id/CACG%3DezaApSMTjd%3DM2Sfn5Ucuggd3FG8Z8Qte8Xq9k5-%2BRQis-g@mail... Discussion: https://www.postgresql.org/message-id/18863-72f08858855344a2@postgresql.org Discussion: https://www.postgresql.org/message-id/18865-d4c66cf35c2a67af@postgresql.org Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e039b09f8d39c4fb76b17b161c1382998e1a47c8 Modified Files -------------- src/bin/pg_resetwal/pg_resetwal.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix pg_upgrade around multixid and mxoff wraparound @ 2025-11-12 11:13 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 5+ messages in thread From: Heikki Linnakangas @ 2025-11-12 11:13 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_upgrade around multixid and mxoff wraparound pg_resetwal didn't accept multixid 0 or multixact offset UINT32_MAX, but they are both valid values that can appear in the control file. That caused pg_upgrade to fail if you tried to upgrade a cluster exactly at multixid or offset wraparound, because pg_upgrade calls pg_resetwal to restore multixid/offset on the new cluster to the values from the old cluster. To fix, allow those values in pg_resetwal. Fixes bugs #18863 and #18865 reported by Dmitry Kovalenko. Backpatch down to v15. Version 14 has the same bug, but the patch doesn't apply cleanly there. It could be made to work but it doesn't seem worth the effort given how rare it is to hit this problem with pg_upgrade, and how few people are upgrading to v14 anymore. Author: Maxim Orlov <orlovmg@gmail.com> Discussion: https://www.postgresql.org/message-id/CACG%3DezaApSMTjd%3DM2Sfn5Ucuggd3FG8Z8Qte8Xq9k5-%2BRQis-g@mail... Discussion: https://www.postgresql.org/message-id/18863-72f08858855344a2@postgresql.org Discussion: https://www.postgresql.org/message-id/18865-d4c66cf35c2a67af@postgresql.org Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/97cd4b65af6c71b31a9c08f5838c6cdd58c1866c Modified Files -------------- src/bin/pg_resetwal/pg_resetwal.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-11-12 11:13 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-11-12 11:13 pgsql: Fix pg_upgrade around multixid and mxoff wraparound Heikki Linnakangas <heikki.linnakangas@iki.fi> 2025-11-12 11:13 pgsql: Fix pg_upgrade around multixid and mxoff wraparound Heikki Linnakangas <heikki.linnakangas@iki.fi> 2025-11-12 11:13 pgsql: Fix pg_upgrade around multixid and mxoff wraparound Heikki Linnakangas <heikki.linnakangas@iki.fi> 2025-11-12 11:13 pgsql: Fix pg_upgrade around multixid and mxoff wraparound Heikki Linnakangas <heikki.linnakangas@iki.fi> 2025-11-12 11:13 pgsql: Fix pg_upgrade around multixid and mxoff wraparound Heikki Linnakangas <heikki.linnakangas@iki.fi>
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