Обсуждение: could not open relation 1663/16525/2604: no such file or dir
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 fields. The conseguencies consists on I can't perform the backUp. How can I solve the problem ? Thanks in advance -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Problemi di Liquidità? Con Logos Finanziaria 30.000 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=2907&d=20070711
On 11.07.2007 12:09, giuseppe.derossi@email.it wrote: > 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 fields. > The conseguencies consists on I can't perform the backUp. > > How can I solve the problem ? Two things: 1.) Do backups 2.) Disable write caching in your I/O sub system unless it's battery backed. 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. -- Regards, Hannes Dorbath
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