Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BE59EB5DBF7 for ; Sun, 9 Oct 2011 14:49:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 55441-05 for ; Sun, 9 Oct 2011 17:49:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from shrek.krogh.cc (2605ds1-ynoe.0.fullrate.dk [90.184.12.24]) by mail.postgresql.org (Postfix) with ESMTP id ABBFEB5DBD0 for ; Sun, 9 Oct 2011 14:49:23 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id 1107C356BD7; Sun, 9 Oct 2011 19:49:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at shrek.krogh.cc Received: from shrek.krogh.cc ([127.0.0.1]) by localhost (shrek.krogh.cc [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wc1pCSZTKA3f; Sun, 9 Oct 2011 19:49:17 +0200 (CEST) Received: from [90.184.13.151] (2605ds1-ynoe.2.fullrate.dk [90.184.13.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jesper@krogh.cc) by shrek.krogh.cc (Postfix) with ESMTPSA id 3DA31356BD6; Sun, 9 Oct 2011 19:49:17 +0200 (CEST) Message-ID: <4E91DE9C.60408@krogh.cc> Date: Sun, 09 Oct 2011 19:49:16 +0200 From: Jesper Krogh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Tom Lane CC: pgsql-admin@postgresql.org Subject: Re: DB corruption. References: <4E9141C8.2020805@krogh.cc> <3774.1318174917@sss.pgh.pa.us> In-Reply-To: <3774.1318174917@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/35 X-Sequence-Number: 38487 On 2011-10-09 17:41, Tom Lane wrote: > 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. So it is "just" blocknumber * blocksize .. offset, blocksize of zeroes.. ? Or is the math harder? -- Jesper