Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B7575636F6F for ; Fri, 26 Feb 2010 16:12:57 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00372-07 for ; Fri, 26 Feb 2010 20:12:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f187.google.com (mail-iw0-f187.google.com [209.85.223.187]) by mail.postgresql.org (Postfix) with ESMTP id 37F796333F5 for ; Fri, 26 Feb 2010 16:12:47 -0400 (AST) Received: by iwn17 with SMTP id 17so459574iwn.19 for ; Fri, 26 Feb 2010 12:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=qHPmxTgxmeqnxH4o79hzH4mnmpBmTAkmNigZhEI0l8M=; b=T/lNfNSXh1wdBRrw7nttgoKdfh1pSTTCWwBKcV1z8HL4MMe71W0pyIYlvSv3v7wMlY 7XyGFl/6zNihoL6nKXTz2iojFN/ghPv28NHRkxwrylhk4rhAWpXFJH5QjWtoLw46qbp4 I/uGrPXM7vqOnx7L8V10KqJUJhIbshow56gXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=eCVdjqubiVL/LJBbm6JHBfGmm3KwzrRKe/kP6oDHdQn2xiMQcS7F61CSOxVOyPB4uV h8n+OKDuHwdMGHEmBnFtF7v5rA0uizYLbApXPsBkEDRkcQYn3UflYLGNqsrEx9E+mEul bOLek3J2wwJ2IQHTFzeGou3LX/l1TgtV9a9wU= MIME-Version: 1.0 Received: by 10.231.85.205 with SMTP id p13mr134765ibl.8.1267215165992; Fri, 26 Feb 2010 12:12:45 -0800 (PST) Date: Fri, 26 Feb 2010 14:12:45 -0600 Message-ID: Subject: db recovery after hd crash (could not open relation 1663/16385/16400: No such file or directory) From: Roland Wells To: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.11 tagged_above=-10 required=5 tests=BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 201002/193 X-Sequence-Number: 33796 Hello all, Background: DB resides on a mirrored array, HD1 goes bad and before it can be replaced, HD2 starts throwing hardware errors. We were able to get a DD from HD2 and have restored the box quite successfully with the exception of the pg db. There WAS corruption to the filesystem. Since the last backup, a significant number of records have been added to the db. If there is a way to recover some data, it would likely be easier to reconcile and fix manually than reenter. Box is FreeBSD 8, postgresql version 8.1. Progress so far: On new hardware, installed pg8.1 and restored data directory and attempted to start pg. After fixing some config differences, it complained of a missing pg_clog/xxx file. After searching the archives for hints, added a file of zero's and pg starts successfully. The db in question exists with what appears to be intact structure. When attempting to dump the db ran into the error: "could not open relation 1663/16385/16400: No such file or directory" and run into similar errors (with different relation numbers) trying to select * from certain tables. I'm stuck here. Assuming the damage to filesystem, what is the best a way forward? Does the relation error indicate damage to the data? or to an index??? Is there a process I can do to try and salvage partial data? Thanks for any help/tips/suggestions. Roland Wells