Confusing message on startup after a crash while recovering

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Confusing message on startup after a crash while recovering
Дата
Msg-id 45D6063F.6020607@phlo.org
обсуждение исходный текст
Ответы Re: Confusing message on startup after a crash while recovering
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: "anyelement2" pseudotype
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: RFC: Temporal Extensions for PostgreSQL