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