Re: inconsistent state after crash recovery

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: inconsistent state after crash recovery
Дата
Msg-id 20130726064752.GG15081@alap2.anarazel.de
обсуждение исходный текст
Ответ на inconsistent state after crash recovery  (Satoshi Nagayasu <snaga@uptime.jp>)
Ответы Re: inconsistent state after crash recovery  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2013-07-26 13:33:13 +0900, Satoshi Nagayasu wrote:
> I received a question about inconsistent state after crash recovery.
> 
> When a table file is broken (or just lost), PostgreSQL can not recover
> a whole table, and does not show any notice while recoverying.
> I think it means "inconsistent" state.
> 
> (1) create a table, and fill records.
> (2) process a checkpoint.
> (3) fill more records.
> (4) force a crash, and delete the table file.
> (5) run recovery on restarting.
> (6) only records after the checkpoint can be recoverd.
> 
> For example, the attached log shows that PostgreSQL can recover
> only 1058 records in the table which contains 2000 records
> before the crash, and does not tell anything in the server log.
> 
> Is this expected or acceptable?

I'd say it's both. WAL replay doesn't have the knowledge to detect that
in all too many cases. Nearly always a page's contents will be restored
by a full page image the first time it gets changed so they will
individually look completely normal.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Condition to become the standby mode.
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: comment for "fast promote"