pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesper Krogh <jesper@krogh.cc>
Cc: pgsql-admin@postgresql.org
Subject: Re: DB corruption.
Date: Sun, 09 Oct 2011 11:41:57 -0400
Message-ID: <3774.1318174917@sss.pgh.pa.us> (raw)
In-Reply-To: <4E9141C8.2020805@krogh.cc>
References: <4E9141C8.2020805@krogh.cc>

Jesper Krogh <jesper@krogh.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



view thread (9+ messages)  latest in thread

Message-ID: <3774.1318174917@sss.pgh.pa.us>
Permalink:  ../3774.1318174917@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3774.1318174917@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jesper@krogh.cc
  Subject: Re: DB corruption.
  In-Reply-To: <3774.1318174917@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox