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 <[email protected]> Discussion: https://postgr.es/m/CAMm1aWZbQ-Acp_xAxC7mX9uZZMH8+NpfepY9w=AOxbBVT9E=u...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/03facc1211b0ff1550f41bcd4da09329080c30f9 Modified Files -------------- src/backend/access/transam/xlogrecovery.c | 2 +- src/test/recovery/meson.build | 1 + .../recovery/t/052_checkpoint_segment_missing.pl | 59 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-)
