X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3E628534BD for ; Mon, 18 Apr 2005 13:18:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71855-04 for ; Mon, 18 Apr 2005 16:18:23 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3BB585338C for ; Mon, 18 Apr 2005 13:18:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3IGIHtr022440; Mon, 18 Apr 2005 12:18:17 -0400 (EDT) To: "Simpson" Cc: pgsql-admin@postgresql.org Subject: Re: Corrupt DB In-reply-to: References: Comments: In-reply-to "Simpson" message dated "Sun, 17 Apr 2005 12:27:35 -0500" Date: Mon, 18 Apr 2005 12:18:17 -0400 Message-ID: <22439.1113841097@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/228 X-Sequence-Number: 17241 "Simpson" writes: > mydb=# vacuum; > ERROR: could not open relation 1663/12649295/16396: No such file or > directory > What would be the best way to fix this? [ checks catalogs... ] In 8.0.*, 16396 is pg_am which is basically constant, so you could replace that file by copying it out of another database, eg cp $PGDATA/base/1663/1/16396 $PGDATA/base/1663/12649295/16396 After that I would try a REINDEX DATABASE in a standalone backend, to repair any damage to the system catalog indexes. Then start the postmaster and see if you can pg_dump and reload the database. VACUUM is *not* a good idea if you have any doubts about the consistency of the database. It's quite likely though that there is more damage and that this procedure will not get you out of trouble :-(. You apparently have got either a flaky disk drive or severe kernel bugs, because files don't just disappear without cause. The kernel version you mentioned looks a bit old, so updating to something more recent would be a good idea. regards, tom lane