From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simpson <asimpson@i-55.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Corrupt DB
Date: Mon, 18 Apr 2005 12:18:17 -0400
Message-ID: <22439.1113841097@sss.pgh.pa.us> (raw)
In-Reply-To: <NFBBKOADOLGDLPMAAHMDGEDLDCAA.asimpson@i-55.com>
References: <NFBBKOADOLGDLPMAAHMDGEDLDCAA.asimpson@i-55.com>
"Simpson" <asimpson@i-55.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, asimpson@i-55.com
Subject: Re: Corrupt DB
In-Reply-To: <22439.1113841097@sss.pgh.pa.us>
References: <NFBBKOADOLGDLPMAAHMDGEDLDCAA.asimpson@i-55.com> <22439.1113841097@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox