Re: need help for PostgreSQL consistency check mechanism

Поиск
Список
Период
Сортировка
От Chen, Dongdong (GE Healthcare)
Тема Re: need help for PostgreSQL consistency check mechanism
Дата
Msg-id 0332CB5EB6327940B291055AAD9642210430FB5F@SHAMLVEM02.e2k.ad.ge.com
обсуждение исходный текст
Ответ на Re: need help for PostgreSQL consistency check mechanism  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: need help for PostgreSQL consistency check mechanism  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
> Row level: it would be very expensive to compute, store and keep up to date.  And it doesn't protect you from
corruptionelsewhere in the block. 

> Block level: there was some effort to implement it for 8.4, but it fell into some deadly traps.

Checksum is my primitive thought, is there table level checksum? Our objective is like this: If shutdown normally, OK.
Ifshutdown ABNORMALLY, then reboot the OS, check whether there is database records loss or damage, if NO, OK, start app
asusual; if YES, run restore app(currently pg_restore). All this should be done automatically without manual operating
andavoid restoring if data records are in good condition. 

> I wrote some plpgsql code a month ago to scan a table and detoast all toastable attributes, reporting it when an
exceptionwas raised.  It was a very effective way to detect corrupted toast entries, which is the most visible way in
whichdata is corrupted. 

Could you share the code pls,  if possible? Just for a referrence.
--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Thanks!
Chen Dongdong

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

Предыдущее
От: Martin Gainty
Дата:
Сообщение: Re: Open source and diagramming survey
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: need help for PostgreSQL consistency check mechanism