pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hannes Dorbath <light@theendofthetunnel.de>
Cc: giuseppe.derossi@email.it
Cc: pgsql-admin@postgresql.org
Subject: Re: could not open relation 1663/16525/2604: no such file or dir
Date: Wed, 11 Jul 2007 11:03:10 -0400
Message-ID: <25343.1184166190@sss.pgh.pa.us> (raw)
In-Reply-To: <4694B69E.3010701@theendofthetunnel.de>
References: <e9fd9324d727a8d1d495bea4f9afef30@164.129.1.43>
	<4694B69E.3010701@theendofthetunnel.de>

Hannes Dorbath <light@theendofthetunnel.de> 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 
> <you_db>;. 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



view thread (3+ messages)

Message-ID: <25343.1184166190@sss.pgh.pa.us>
Permalink:  ../25343.1184166190@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25343.1184166190@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, light@theendofthetunnel.de, giuseppe.derossi@email.it
  Subject: Re: could not open relation 1663/16525/2604: no such file or dir
  In-Reply-To: <25343.1184166190@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