Data corruption / recover

Поиск
Список
Период
Сортировка
От Daniel Paval
Тема Data corruption / recover
Дата
Msg-id 512F3562.9060609@scorpionsoftware.ro
обсуждение исходный текст
Ответы Re: Data corruption / recover  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Hi,

We're dealing with the following situation (PG version is 7.4.30): somehow, a DB has gone missing from pg_database (psql \l listing doesn't show it anymore). More, while you can still \c to it, a \d table listing only shows a fraction of the tables. A \d on the existing tables shows missing columns as well.. However, all the tables (still visible or not) may be queried by selects via psql and the actual data and columns in the result sets seem just fine.

We backed up the data folder and for the last 24h tried to recover the situation to a point where pg_dump works. Unfortunately we haven't been fully successful yet although we tried tons of suggestions in previous similar posts. Reindex didn't help, but a "VACUUM FULL FREEZE [ANALYZE]" did free 70% (14GB to 4) of the used disk space. Of course, the database wasn't vacuumed regularly as it should have been so:

WARNING:  some databases have not been vacuumed in over 2 billion transactions
DETAIL:  You may have already suffered transaction-wraparound data loss.

A full vacuum without the freeze option does make all databases, tables and users visible, but duplicated, i.e. \l then shows the database twice and a \d on the database lists all tables twice. The postgres user appears twice in pg_user, etc. pg_dump won't work if the database is not listed and won't either if the postgres user is duplicated..

Does this sound familiar to anyone? It's a pity that all the data seems to be there, but we're not able to recover and restore it to a clean DB. We'd appreciate any suggestions.

Thank you!

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

Предыдущее
От: "David F. Skoll"
Дата:
Сообщение: CREATE TABLE LIKE and tablespaces
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Data corruption / recover