pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid torn copy of the control file in base backups 6+ messages / 1 participants [nested] [flat]
* pgsql: Avoid torn copy of the control file in base backups @ 2026-10-27 23:46 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-10-27 23:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid torn copy of the control file in base backups Base backups read the control file (pg_control) from disk without any protection against concurrent writes by the server, making it exposed to torn copies. Attempting to use such a control file at startup would cause a failure with a CRC not matching. Base backups now read the control file while holding ControlFileLock. c558e6fd92f has done the same for some SQL functions. The contents of the file are saved in memory and sent over the wire as-is. Backpatch down to v15. This issue is older than v15 but v14 is left out of the picture as it is going to be EOL soon, so it does not seem worth taking a risk for. Author: David Steele <david@pgbackrest.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4a92c8c29bd0068ecc747cca5d77949660b5f0a8 Modified Files -------------- src/backend/backup/basebackup.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid torn copy of the control file in base backups @ 2026-10-27 23:46 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-10-27 23:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid torn copy of the control file in base backups Base backups read the control file (pg_control) from disk without any protection against concurrent writes by the server, making it exposed to torn copies. Attempting to use such a control file at startup would cause a failure with a CRC not matching. Base backups now read the control file while holding ControlFileLock. c558e6fd92f has done the same for some SQL functions. The contents of the file are saved in memory and sent over the wire as-is. Backpatch down to v15. This issue is older than v15 but v14 is left out of the picture as it is going to be EOL soon, so it does not seem worth taking a risk for. Author: David Steele <david@pgbackrest.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org Backpatch-through: 15 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e2c633b43b0efc1e3e4df1aab93a54479d297487 Modified Files -------------- src/backend/backup/basebackup.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid torn copy of the control file in base backups @ 2026-10-27 23:46 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-10-27 23:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid torn copy of the control file in base backups Base backups read the control file (pg_control) from disk without any protection against concurrent writes by the server, making it exposed to torn copies. Attempting to use such a control file at startup would cause a failure with a CRC not matching. Base backups now read the control file while holding ControlFileLock. c558e6fd92f has done the same for some SQL functions. The contents of the file are saved in memory and sent over the wire as-is. Backpatch down to v15. This issue is older than v15 but v14 is left out of the picture as it is going to be EOL soon, so it does not seem worth taking a risk for. Author: David Steele <david@pgbackrest.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org Backpatch-through: 15 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8cddd5fc8fe80efccdae2fd4aa9b99d94d740f95 Modified Files -------------- src/backend/backup/basebackup.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid torn copy of the control file in base backups @ 2026-10-27 23:46 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-10-27 23:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid torn copy of the control file in base backups Base backups read the control file (pg_control) from disk without any protection against concurrent writes by the server, making it exposed to torn copies. Attempting to use such a control file at startup would cause a failure with a CRC not matching. Base backups now read the control file while holding ControlFileLock. c558e6fd92f has done the same for some SQL functions. The contents of the file are saved in memory and sent over the wire as-is. Backpatch down to v15. This issue is older than v15 but v14 is left out of the picture as it is going to be EOL soon, so it does not seem worth taking a risk for. Author: David Steele <david@pgbackrest.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4aeefb26d62ba3408aa71bef65beba68a4af7025 Modified Files -------------- src/backend/backup/basebackup.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid torn copy of the control file in base backups @ 2026-10-27 23:46 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-10-27 23:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid torn copy of the control file in base backups Base backups read the control file (pg_control) from disk without any protection against concurrent writes by the server, making it exposed to torn copies. Attempting to use such a control file at startup would cause a failure with a CRC not matching. Base backups now read the control file while holding ControlFileLock. c558e6fd92f has done the same for some SQL functions. The contents of the file are saved in memory and sent over the wire as-is. Backpatch down to v15. This issue is older than v15 but v14 is left out of the picture as it is going to be EOL soon, so it does not seem worth taking a risk for. Author: David Steele <david@pgbackrest.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5dc3cfbb9023f018a441f43259b4619271b36326 Modified Files -------------- src/backend/backup/basebackup.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Avoid torn copy of the control file in base backups @ 2026-10-27 23:46 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2026-10-27 23:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid torn copy of the control file in base backups Base backups read the control file (pg_control) from disk without any protection against concurrent writes by the server, making it exposed to torn copies. Attempting to use such a control file at startup would cause a failure with a CRC not matching. Base backups now read the control file while holding ControlFileLock. c558e6fd92f has done the same for some SQL functions. The contents of the file are saved in memory and sent over the wire as-is. Backpatch down to v15. This issue is older than v15 but v14 is left out of the picture as it is going to be EOL soon, so it does not seem worth taking a risk for. Author: David Steele <david@pgbackrest.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/d1697de1-eb7f-41bf-a4b7-bba7203df11f@pgbackrest.org Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/316a870654a382d7c91b88f4c0dcc7cbb2f2c0be Modified Files -------------- src/backend/backup/basebackup.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-10-27 23:46 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-27 23:46 pgsql: Avoid torn copy of the control file in base backups Michael Paquier <michael@paquier.xyz> 2026-10-27 23:46 pgsql: Avoid torn copy of the control file in base backups Michael Paquier <michael@paquier.xyz> 2026-10-27 23:46 pgsql: Avoid torn copy of the control file in base backups Michael Paquier <michael@paquier.xyz> 2026-10-27 23:46 pgsql: Avoid torn copy of the control file in base backups Michael Paquier <michael@paquier.xyz> 2026-10-27 23:46 pgsql: Avoid torn copy of the control file in base backups Michael Paquier <michael@paquier.xyz> 2026-10-27 23:46 pgsql: Avoid torn copy of the control file in base backups Michael Paquier <michael@paquier.xyz>
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