Re: pg_class / missing tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_class / missing tables
Дата
Msg-id 3144.1095142657@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_class / missing tables  (Wim Kerkhoff <wim@nyetwork.org>)
Ответы Re: pg_class / missing tables  (Wim Kerkhoff <wim@nyetwork.org>)
Список pgsql-admin
Wim Kerkhoff <wim@nyetwork.org> writes:
> Short story: server was rebooted without being shut down properly, upon
> bootup PostgreSQL (7.4.3) starts fine, but a couple of data tables
> (along with their associated indexes and sequences) are gone. Other
> tables are still there.

Hmm.  What *exactly* happens when you try
    select * from pg_class where relname = 'missing_table_name';

Also, let's see the error log from when you tried to restart the server
after the crash.

> What's interested is that if I try:
> CREATE TABLE missing_table_name (foo int);
> It does complain that the table already exists...

You sure it's not complaining that the type already exists?

> What's happening here?

I'm suspicious that you've got a damaged block of pg_class.  It would
make sense that that would take out several rows created at about the
same time, which would explain the fact that the lost items seem closely
related.

If you had *no* other lossage, you might be able to recover by
recreating the tables with the exact same schemas, and then copying the
old data files over these tables' data files.  But there are enough
gotchas in this idea that "restore from backup" is probably a better
answer.

            regards, tom lane

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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Trigger set to backup to other table NOT FUNCTIONING...
Следующее
От: Joepie Platteau
Дата:
Сообщение: Re: Trigger set to backup to other table NOT FUNCTIONING...