Re: DB corruption.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jesper Krogh <jesper(at)krogh(dot)cc>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: DB corruption.
Date: 2011-10-09 15:41:57
Message-ID: 3774.1318174917@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jesper Krogh <jesper(at)krogh(dot)cc> writes:
> I have got a corrupt db.. most likely due to an xfs bug..

> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR: invalid page header in block
> 14174944 of relation base/16385/58318948

> Can I somehow get pg_dump to "ignore" that block and dump everything else?

The traditional solution is to zero out the bad block, eg using dd from
/dev/zero. It's easy to zero more than you intended, so practicing on a
scratch copy of the table is recommended.

But first you should check what kind of relation that is. If it's an
index, you could just REINDEX it instead.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jesper Krogh 2011-10-09 17:49:16 Re: DB corruption.
Previous Message Lukasz Brodziak 2011-10-09 15:04:17 Re: DB corruption.