Re: Restore backup file "with oids"

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Restore backup file "with oids"
Дата
Msg-id A23B66BD-E6B5-4917-8391-3DBACCABB68E@iki.fi
обсуждение исходный текст
Ответ на Restore backup file "with oids"  (gmail Vladimir Koković <vladimir.kokovic@gmail.com>)
Ответы Re: Restore backup file "with oids"  (Vladimir Koković <vladimir.kokovic@a-asoft.com>)
Список pgsql-hackers
On 18 December 2019 19:28:07 EET, "gmail Vladimir Koković" <vladimir.kokovic@gmail.com> wrote:
>Is there somewhere a script that can do a restore backup file "with
>oids" in some newer DB where there is no term "with oids"?

There is nothing automatic, some manual work is needed. A couple of ideas:

1. Install an older version of PostgreSQL that still supports WITH OIDS, and restore the dump there. Use ALTER TABLE
SETWITHOUT OIDS, and dump the database again (preferably with v12 of pg_dump). 

2. Create the table manually, but with a regular oid-type column in place of the system column. Do a data-only restore.


You didn't mention what format the backup dump is. If it's in custom format, you can do a data-only restore easily. If
it'sa text sql file, and it's not too large, you can load it in a text exitor and edit manually. 

- Heikki



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Read Uncommitted
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Read Uncommitted