Re: pg_dump With OIDs Supported? - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump With OIDs Supported?
Date
Msg-id 17298.1151086663@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump With OIDs Supported?  (Dylan Hansen <dhansen@pixpo.com>)
Responses Re: pg_dump With OIDs Supported?
List pgsql-general
Dylan Hansen <dhansen@pixpo.com> writes:
> Since we've started using the pg_autovacuum table we've come to
> realize that keeping OID values between our database dumps is
> critical.  I've been doing some testing using the pg_dump command
> with the --oids option.

--oids is only meant to preserve OIDs within user tables; it never has
and never will preserve OIDs for system-catalog entries.  The real
problem here is pg_autovacuum, which doesn't have any dump/restore
support at the moment.  This is because we stuck it into 8.1 at the last
minute and aren't yet convinced it will survive in its current form.

It strikes me that a relatively trivial hack would make it easier to
dump and restore pg_autovacuum manually using COPY: change the declared
type of the vacrelid column to "regclass".  This would make no
difference to the internal use of the table, but it'd cause COPY to emit
the column values in a symbolic format that would restore correctly.

            regards, tom lane

pgsql-general by date:

Previous
From: "TJ O'Donnell"
Date:
Subject: Re: Changing encoding of a database
Next
From: Wes
Date:
Subject: Re: Adding foreign key constraints without integrity