could not open relation 1663/16525/2604: no such file or dir

could not open relation 1663/16525/2604: no such file or dir

am 11.07.2007 12:09:57 von giuseppe.derossi

Help,
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
after that if I push ok I can see the data in the tables
I see in the proprieties window that the create definition miss the field=
s.
The conseguencies consists on I can't perform the backUp.

How can I solve the problem ?
Thanks in advance=20
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
=20
Sponsor:
Problemi di Liquidit=E0? Con Logos Finanziaria 30.000 =80 in 24 ore a
dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi clicca qui

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3D2907&d=3D20070 =
711



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Re: could not open relation 1663/16525/2604: no such file or dir

am 11.07.2007 17:03:10 von Tom Lane

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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly