Re: Restore backup file "with oids"

From: Vladimir Koković <vladimir(dot)kokovic(at)a-asoft(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org, hlinnaka(at)iki(dot)fi
Subject: Re: Restore backup file "with oids"
Date: 2019-12-18 19:57:26
Message-ID: 69f29bf4-7497-d9f7-fae9-63703898d3e5@a-asoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

HI,

The first thing I have to say is that I only have a plain backup file
"with oids" from "PostgreSQL 8.4.2, 32-bit",

from which I should take the contents of some tables.
Any help from someone who was in a similar situation would help me a lot
in resolving this situation.

Thank you Heikki for your solution.

Vladimir Koković, DP senior(69)

Serbia, Belgrade, 18.December 2019

On 18.12.19. 19:34, Heikki Linnakangas wrote:
> On 18 December 2019 19:28:07 EET, "gmail Vladimir Koković" <vladimir(dot)kokovic(at)gmail(dot)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 SET WITHOUT 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's a text sql file, and it's not too large, you can load it in a text exitor and edit manually.
>
> - Heikki
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2019-12-18 20:11:50 Re: inherits clause for CREATE TYPE? -
Previous Message Stephen Frost 2019-12-18 19:34:33 Re: Read Uncommitted