pgsql: Switch to FATAL error for missing checkpoint record without back - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Switch to FATAL error for missing checkpoint record without back
Date
Msg-id E1vznKX-003FXl-2E@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix misuse of "volatile" in xml.c
Next
From: Robert Haas
Date:
Subject: pgsql: Allow extensions to mark an individual index as disabled.