Re: need help for PostgreSQL consistency check mechanism

From: "Chen, Dongdong (GE Healthcare)" <DongdongChen(at)ge(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>
Cc: <jd(at)commandprompt(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: need help for PostgreSQL consistency check mechanism
Date: 2009-04-27 02:13:47
Message-ID: 0332CB5EB6327940B291055AAD9642210430FB5F@SHAMLVEM02.e2k.ad.ge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Row level: it would be very expensive to compute, store and keep up to date. And it doesn't protect you from corruption elsewhere 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. If shutdown ABNORMALLY, then reboot the OS, check whether there is database records loss or damage, if NO, OK, start app as usual; if YES, run restore app(currently pg_restore). All this should be done automatically without manual operating and avoid 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 exception was raised. It was a very effective way to detect corrupted toast entries, which is the most visible way in which data 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2009-04-27 06:18:59 Re: need help for PostgreSQL consistency check mechanism
Previous Message Martin Gainty 2009-04-27 00:43:51 Re: Open source and diagramming survey