Re: How can I find a broken row in a table

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "Khangelani Gama" <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za>
Subject: Re: How can I find a broken row in a table
Date: 2010-04-16 14:26:45
Message-ID: 4BC82D5502000025000309D8@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Khangelani Gama <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za> wrote:

> there is a table that has a broken row, but now I don't know which
> one is broken. the table has about 20974 pages.

If there are any indexes on the table which haven't been corrupted,
you might try selecting ranges of rows using one of them, capturing
the undamaged data into a new table. By subdividing damaged ranges
you can do a sort of "binary search" for the bad rows while
recovering the good ones.

-Kevin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-04-16 14:46:02 Re: Vacuum Full (PG 8.1) - Urgent help needed - Cancel & transaction "liberation"
Previous Message Tom Lane 2010-04-16 14:23:48 Re: How can I find a broken row in a table