Re: Add checkpoint/redo LSNs to recovery errors.

From: David Steele <david(at)pgmasters(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add checkpoint/redo LSNs to recovery errors.
Date: 2024-03-10 03:58:19
Message-ID: 882d1d78-f17a-4f70-a758-2750c49b71f6@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/29/24 16:42, Michael Paquier wrote:
> On Thu, Feb 29, 2024 at 10:53:15AM +1300, David Steele wrote:
>> This patch adds checkpoint/redo LSNs to recovery error messages where they
>> may be useful for debugging.
>
> I've scanned a bit xlogrecovery.c, and I have spotted a couple of that
> could gain more information.
>
> ereport(PANIC,
> (errmsg("invalid redo record in shutdown checkpoint")));
> [...]
> ereport(PANIC,
> (errmsg("invalid redo in checkpoint record")));
> These two could mention CheckPointLoc and checkPoint.redo.
>
> ereport(PANIC,
> (errmsg("invalid next transaction ID")));
> Perhaps some XID information could be added here?
>
> ereport(FATAL,
> (errmsg("WAL ends before consistent recovery point")));
> [...]
> ereport(FATAL,
> (errmsg("WAL ends before end of online backup"),
>
> These two are in xlog.c, and don't mention backupStartPoint for the
> first one. Perhaps there's a point in adding some information about
> EndOfLog and LocalMinRecoveryPoint as well?

For now I'd like to just focus on these three messages that are related
to a missing backup_label or a misconfiguration of restore_command when
backup_label is present.

No doubt there are many other recovery log messages that could be
improved, but I'd rather not bog down the patch.

Regards,
-David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2024-03-10 04:02:39 Re: Failures in constraints regression test, "read only 0 of 8192 bytes"
Previous Message David Steele 2024-03-10 03:47:26 Re: Add recovery to pg_control and remove backup_label