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

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Re: FATAL: catalog is missing 1 attribute(s) for relid
Дата
Msg-id 20050115162533.K16498@ganymede.hub.org
обсуждение исходный текст
Ответ на Re: FATAL: catalog is missing 1 attribute(s) for relid 16396  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: FATAL: catalog is missing 1 attribute(s) for relid 16396  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 15 Jan 2005, Tom Lane wrote:

> "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?

Hrmmm ... how about if I pg_dump --oids pg_class, make the modes and then 
reload it as opg_class, shut down the database server and move opg_class 
over pg_class, after making the required modifications to opg_class?

restore=# select oid from pg_class where relname = 'email';   oid
--------- 8709044
(1 row)

restore=# select oid from opg_class where relname = 'email';   oid
--------- 8709044
(1 row)

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: sparse (static analyzer) report
Следующее
От: Tom Lane
Дата:
Сообщение: Re: sparse (static analyzer) report