mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
check_control_files() detected a chain whose backups were taken under different data checksum states, warned, and proceeded. The output directory keeps the last backup's control file, so a full backup taken with checksums off combined with an incremental taken after an offline enable produces a cluster whose control file says "on" while most of its blocks carry no checksums; it starts, and then every connection dies on the first unchecksummed catalog page. An offline enable between two backups of a chain is all it takes, since it rewrites every page without logging anything, so the incremental backup does not re-ship the pages. Turn the warning into an error, matching what pg_rewind does for the equivalent combinations. The check stays asymmetric on purpose: when the last backup was taken with checksums off, stale checksums from an earlier backup are never verified, and that chain remains usable. Author: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/anwm6UPxoVS41QA2@bdtpg Backpatch-through: 19