Confusing message on startup after a crash while recovering - Mailing list pgsql-hackers

From Florian G. Pflug
Subject Confusing message on startup after a crash while recovering
Date
Msg-id 45D6063F.6020607@phlo.org
Whole thread Raw
Responses Re: Confusing message on startup after a crash while recovering  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi

When postgres crashes during recovery, and is then restarted, it
says:
"database system was interrupted while in recovery at ...
This probably means that some data is corrupted and
you will have to use the last backup for recovery."

When I first read that message, I assumed that there are cases were
postgres can't recover from a crash that happened during recovery.
I guessed that some operations done during wal restore are not
idempotent, and lead to corrupt data if performed twice.

Only after actually reading the sourcecode of xlog.c, and seeing that
the a similar (but better worded) warning is output after a crash during
archive log replay, I realized that this warning probably just means
that corrupt data could be the _cause_ for the crash during recovery, not
the _caused_by_ a crash during recovery.

I'd suggest that the text is changed to something along the line of:
"database system was interrupted while in recovery at ...
If this has occurred more than once some data may be corrupted and
you may need to restore from the last backup."

This would also match the message for "interrupted while doign archive
log replay" more closely.

greetings, Florian Pflug


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: "anyelement2" pseudotype
Next
From: "Jim C. Nasby"
Date:
Subject: Re: RFC: Temporal Extensions for PostgreSQL