data files corruption after server crash

Поиск
Список
Период
Сортировка
От Rytis
Тема data files corruption after server crash
Дата
Msg-id 433D6474.5040004@fotofabrikas.lt
обсуждение исходный текст
Список pgsql-admin
Hello,

Our server crashed and some of the pgsql/base files got corrupted. 2 out
of 10 databases now reject all connections with error:

psql: FATAL:  "/var/db/pgsql/base/17236" is not a valid data directory
DETAIL:  File "/var/db/pgsql/base/17236/PG_VERSION" is missing.

We have dump that's a week old... (I know dumps should be made more
often, suppose now they will be made each night:)
Our try to recover lost information was to create a database from the
old dump and then try to rewrite the files over with the ones left from
corrupted DB, but OID's have changed and after overwritting files we got
nothing. Now the structure remains ok, but when trying to browse the
overwritten tables we get error:

ERROR:  invalid page header in block 0 of relation "cart_items"

After that we tried to do that vise versa :) to change 'pg_class' table (relname field) to reflect the change of file
thatgot copied into db dir without changing the name of table file. 
Then database said something like (don't have it already so error text goes from memory): ERROR relation not found,
filedoes not exit in /base/19345/23456. If I understand correctly, the DB now can't find primary/foreight keys and
relationsto that table. 

That's the whole situation, the question would be:

Is it possible to restore our lost data?
Is it possible to move files over like I've described, if not... can anyone help, or our data (and time in try to
restoreit) is just wasted? 



P.S. sorry for mistakes if any English is not my mother tongue

Waiting for replies...


В списке pgsql-admin по дате отправления:

Предыдущее
От: taso
Дата:
Сообщение: HP Openview
Следующее
От: Kevin Seghetti
Дата:
Сообщение: Need help with corrupt pg_statistic