Re: need help for PostgreSQL consistency check mechanism - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: need help for PostgreSQL consistency check mechanism
Date
Msg-id 20090424170542.GT10358@alvh.no-ip.org
Whole thread Raw
In response to Re: need help for PostgreSQL consistency check mechanism  (Filip Rembiałkowski <plk.zuber@gmail.com>)
Responses Re: need help for PostgreSQL consistency check mechanism
List pgsql-general
Filip Rembiałkowski escribió:

> OTOH, there could be some consistency check method... If postgres had block-
> or row-level checksums, this could do.

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.

> The best way I know is to do plain pg_dumpall. But this does not detect all
> data corruptions.

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.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: need help for PostgreSQL consistency check mechanism
Next
From: Josh Trutwin
Date:
Subject: Selling an 8.1 to 8.3 upgrade