Re: Restore backup file "with oids" - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Restore backup file "with oids"
Date
Msg-id A23B66BD-E6B5-4917-8391-3DBACCABB68E@iki.fi
Whole thread Raw
In response to Restore backup file "with oids"  (gmail Vladimir Koković <vladimir.kokovic@gmail.com>)
Responses Re: Restore backup file "with oids"  (Vladimir Koković <vladimir.kokovic@a-asoft.com>)
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: Read Uncommitted
Next
From: Tom Lane
Date:
Subject: Re: Read Uncommitted