Switch to FATAL error for missing checkpoint record without backup_label
Michael Paquier <michael@paquier.xyz>
Switch to FATAL error for missing checkpoint record without backup_label Crash recovery started without a backup_label previously crashed with a PANIC if the checkpoint record could not be found. This commit lowers the report generated to be a FATAL instead. With recovery methods being more imaginative these days, this should provide more flexibility when handling PostgreSQL recovery processing in the event of a driver error, similarly to 15f68cebdcec. An extra benefit of this change is that it becomes possible to add a test to check that a FATAL is hit with an expected error message pattern. With the recovery code becoming more complicated over the last couple of years, I suspect that this will be benefitial to cover in the long-term. The original PANIC behavior has been introduced in the early days of crash recovery, as of 4d14fe0048cf (PANIC did not exist yet, the code used STOP). Author: Nitin Jadhav <nitinjadhavpostgres@gmail.com> Discussion: https://postgr.es/m/CAMm1aWZbQ-Acp_xAxC7mX9uZZMH8+NpfepY9w=AOxbBVT9E=uA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlogrecovery.c | modified | +1 −1 |
| src/test/recovery/meson.build | modified | +1 −0 |
| src/test/recovery/t/052_checkpoint_segment_missing.pl | added | +59 −0 |
Discussion
- Change checkpoint‑record‑missing PANIC to FATAL 11 messages · 2025-12-16 → 2026-06-26