Re: Known issue with Reindex-based corruption?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Known issue with Reindex-based corruption?
Дата
Msg-id 13088.1077818158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Known issue with Reindex-based corruption?  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Known issue with Reindex-based corruption?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
> The basic symptoms are:
> 1) Machine stated scheduled REINDEX.
> 2) Unexpected power-out
> 3) On reboot, we have 2 different versions of the index file on disk,
> one with 0 bytes.   Attempts to use the index (via SELECT) result in
> statement-fatal errors.

Hm.  Unless the REINDEX actually *completed* before the power-out, it
should not have had any effect other than creation of an unreferenced
file.  My guess is that the reindex did complete, and updated the
index's pg_class row to point at the new file, but for some reason only
the pg_class update got down to disk.

> I'm waiting on more data.  For now, I was wondering whether there was
> a known issue with WAL recovery on indexes in 7.2.4.  Neil thought
> there was.

That's a definite possibility.  Before 7.4 we did not emit WAL records
for data written during index build.  What we could have here is that
the transaction completed and synced to WAL, but none of the data-file
writes were sent to disk before power-out.  On restart, WAL replay would
faithfully update the pg_class row, but the index file would still be
empty :-(

            regards, tom lane

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Known issue with Reindex-based corruption?
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Known issue with Reindex-based corruption?