Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 5921CB5DC01 for ; Sun, 9 Oct 2011 12:42:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 98760-07 for ; Sun, 9 Oct 2011 15:42:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0142DB5DBFD for ; Sun, 9 Oct 2011 12:42:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p99FfvCQ003775; Sun, 9 Oct 2011 11:41:57 -0400 (EDT) To: Jesper Krogh cc: pgsql-admin@postgresql.org Subject: Re: DB corruption. In-reply-to: <4E9141C8.2020805@krogh.cc> References: <4E9141C8.2020805@krogh.cc> Comments: In-reply-to Jesper Krogh message dated "Sun, 09 Oct 2011 08:40:08 +0200" Date: Sun, 09 Oct 2011 11:41:57 -0400 Message-ID: <3774.1318174917@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/34 X-Sequence-Number: 38486 Jesper Krogh 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