Unable to restore table oids from pg_dump

Поиск
Список
Период
Сортировка
От dharana
Тема Unable to restore table oids from pg_dump
Дата
Msg-id 42496C98.2050000@dharana.net
обсуждение исходный текст
Список pgsql-general
Hello list,

I've got a problem. I have a table like this:

  id                 | integer | not null
  item_table_oid    | oid     |
  item_row_id | oid     |


"id" is a serial field for this table,

"item_table_oid" is an oid referencing the oid of the table in the
pg_catalog.pg_class table

"item_row_id" is an oid that references the oid of a data row in the
table refered by item_table_oid

When I pg_dumpall -o and then I try to restore it in a clean cluster
every table has new OIDs so the item_table_oid is invalid.

I did a "DELETE FROM pg_class" and I learnt that it's a quick way of
erasing a database.

Isn't there any way of dumping the pg_class entries so the references
would still work after restoring in a clean env?

Thanks in advance,

--
Juan Alonso
http://gamersmafia.com | http://laflecha.net


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_xlog disk full error, i need help
Следующее
От: Alex Adriaanse
Дата:
Сообщение: Re: Tracking row updates - race condition