Re: [HACKERS] Finding corrupt data - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Finding corrupt data
Date
Msg-id 24469.945355571@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Finding corrupt data  (Ed Loehr <ELOEHR@austin.rr.com>)
List pgsql-hackers
Ed Loehr <ELOEHR@austin.rr.com> writes:
> One RDBMS I used had a utility called 'dbcheck' which did some sort of
> examination of indices, tables, etc., and issued an 'OK' or 'CORRUPT' for
> each examined object.  Such a utility for pgsql might simply do some
> combination of SELECT * or COPY TO as you suggest above.

> Would it be reasonable to put such a tool make its way onto the todo list, in
> the absence of better alternatives?

What'd be really nice is some kind of 'fsck' for databases.  But it'd be
a lot of work to write one, and more work to keep it up to date in the
face of continuing changes to the database representation.

One simpler thing that I'd like to see is for VACUUM to recreate indexes
from scratch instead of trying to compact them.  This would provide a
very simple recovery procedure for corrupted indexes, and it seems
possible that it'd actually be faster than what VACUUM does now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Postmaster options, process spawning, logging, etc.
Next
From: Zeugswetter Andreas SB
Date:
Subject: Re: [HACKERS] SELECT ... AS ... names in WHERE/GROUP BY/HAVIN G