Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id E3E559FA06B for ; Wed, 11 Jul 2007 12:03:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 49437-04 for ; Wed, 11 Jul 2007 12:03:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 832EE9FBF08 for ; Wed, 11 Jul 2007 12:03:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l6BF3ANb025344; Wed, 11 Jul 2007 11:03:10 -0400 (EDT) To: Hannes Dorbath cc: giuseppe.derossi@email.it, pgsql-admin@postgresql.org Subject: Re: could not open relation 1663/16525/2604: no such file or dir In-reply-to: <4694B69E.3010701@theendofthetunnel.de> References: <4694B69E.3010701@theendofthetunnel.de> Comments: In-reply-to Hannes Dorbath message dated "Wed, 11 Jul 2007 12:53:18 +0200" Date: Wed, 11 Jul 2007 11:03:10 -0400 Message-ID: <25343.1184166190@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/108 X-Sequence-Number: 26089 Hannes Dorbath writes: > On 11.07.2007 12:09, giuseppe.derossi@email.it wrote: >> alfter my computer chrashing, when I try to read a table by using pgAdmin I >> get the following errors: >> could not open relation 1663/16525/2604 >> could not open relation 1663/16525/2611 >> could not open relation 1663/16525/2604 > 1.) Do backups > 2.) Disable write caching in your I/O sub system unless it's battery backed. Yeah. Postgres cannot defend against the filesystem losing entire files. > Shutdown PG, backup $PGDATA directory, start PG, try REINDEX DATABASE > ;. If that doesn't help anything, there are some tools available > on pg foundry to inspect the raw files in $PGDATA. You might be able to > get some of your data back using them. REINDEX won't help get back missing tables :-(. In this case he's missing at least pg_attrdef and pg_inherits: regression=# select 2604::regclass; regclass ------------ pg_attrdef (1 row) regression=# select 2611::regclass; regclass ------------- pg_inherits (1 row) So if this is the *only* damage then he could dump and perhaps manually reconstruct the missing DEFAULT and INHERITS clauses (if any). The real problem is that this is likely only the tip of the iceberg :-( regards, tom lane