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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FATAL: catalog is missing 1 attribute(s) for relid 16396
Дата
Msg-id 11184.1105820105@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: FATAL: catalog is missing 1 attribute(s) for relid  ("Marc G. Fournier" <scrappy@postgresql.org>)
Ответы Re: FATAL: catalog is missing 1 attribute(s) for relid  ("Marc G. Fournier" <scrappy@postgresql.org>)
Список pgsql-hackers
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> can I force the reuse of an OID?  for instance, if I were to get the 
> map'ngs for those toast files, and then 'drop' the old database (I've got 
> several backups of it already), can I insert those records into pg_class, 
> with the proper OID?

I was wondering about that myself.  If you could relabel the pg_class
rows for the new TOAST tables with the OIDs of the old TOAST tables,
you'd be set.  (You'd need to change the relfilenode fields of their
owning tables too, probably, although if you just want to dump out the
data you might not have to bother with that.)  The problem is that there
is no way to do that within Postgres.  The only way I can think of is to
shut down the postmaster and change pg_class with a hex editor, which
seems mighty tedious and error-prone.  However, with any luck you'd only
need to fix half a dozen or so entries ... how many tables in this
database have nonempty TOAST tables?

If you try this, keep in mind that you'd have to REINDEX pg_class
afterwards.
        regards, tom lane


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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: FATAL: catalog is missing 1 attribute(s) for relid
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: sparse (static analyzer) report