Re: FATAL: catalog is missing 1 attribute(s) for relid

Поиск
Список
Период
Сортировка
От Mark Kirkwood
Тема Re: FATAL: catalog is missing 1 attribute(s) for relid
Дата
Msg-id 41E76C34.8020005@coretech.co.nz
обсуждение исходный текст
Ответ на Re: FATAL: catalog is missing 1 attribute(s) for relid  (Mark Kirkwood <markir@coretech.co.nz>)
Список pgsql-hackers
Marc,

In case you don't work out a better way to sort this, I can reproduce
and fix the error 'catalog is missing n attribute(s) for relid 16396'
caused by directly deleting (part of) pg_attribute:

Setup :

$ initdb
$ pg_ctl start
$ createdb test

Backup :

$ pg_ctl stop
$ tar -czvf pgdata.tar.gz pgdata

Break :

$ pg_ctl start
$ psql -d test -c "delete from pg_attribute where attrelid=16396"
$ psql test [gets FATAL catalog is missing 20 attribute(s) for relid 16396]

Fix (restore pg_attribute to database test):

$ pg_ctl stop
$ tar -zxvf pgdata.tar.gz pgdata/base/17142/1249
$ pg_ctl start
$ psql test [now works]

The caveat is that any relations created or modified between the backup
and breakage will not be properly restored.

regards

Mark




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

Предыдущее
От: Ron Mayer
Дата:
Сообщение: Re: Top-k optimizations?
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: FATAL: catalog is missing 1 attribute(s) for relid