Re: backup tableoids (pg_class.oid) ?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "fkater(at)googlemail(dot)com" <fkater(at)googlemail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: backup tableoids (pg_class.oid) ?
Date: 2008-02-04 15:46:22
Message-ID: 20080204154622.GA17150@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 04, 2008 at 04:14:12PM +0100, fkater(at)googlemail(dot)com wrote:
> Hi,
>
> my db structure relays on the OIDs of tables (stored as OIDs of
> pg_class).
>
> However, 'pg_dumpall -o ...' seems to save the oids of all data but not
> the tableoids, so, when I restore data I get different tableoids than I
> had before!
>
> Is there anything I could do to backup and restore even the tableoids
> (besides stopping server and copying the files) ?

No. When creating a table there is no way to specify the OID, hence
when restoring a dump there is no way to preserve them. This was never
guarenteed, the OID saving was for large objects and rows, not table
oids.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message vincent 2008-02-04 15:48:15 Re: postgresql book - practical or something newer?
Previous Message Ivan Sergio Borgonovo 2008-02-04 15:45:04 Re: loading files into tables