pg_dump With OIDs Supported?

From: Dylan Hansen <dhansen(at)pixpo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_dump With OIDs Supported?
Date: 2006-06-23 17:43:06
Message-ID: CD484DE0-137E-47EC-BF83-F4749EA57A61@pixpo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings everyone,

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. For some reason, it doesn't seem like the
the OID values are being dumped, because when I restore the dump into
a different database I find that the OID values for my tables are
different.

As a test, I did the following:
createdb testdb1
psql -c "create table mytest(words varchar)" testdb1
psql -c "select oid from pg_class where relname = 'mytest'" testdb1
oid = 52178917
pg_dump -f testdb.sql --oids testdb1
createdb testdb2
psql testdb2 < testdb.sql
psql -c "select oid from pg_class where relname = 'mytest'" testdb2
oid = 52178923

As you can see, the OID values are different in each database.
Looking at the SQL dump I do not see any information related to OIDs.

I also tried using pg_dump with the "-F c" and "-F t" parameter,
using the pg_restore command and I see the same result. I've tested
with PostgreSQL 8.1.3 on Mac OSX as well as PostgreSQL 8.1.4 on RHEL-3.

Is this a bug or is this feature not supported anymore? Thanks for
any input!
--
Dylan Hansen
Enterprise Systems Developer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2006-06-23 18:00:38 Re: Idea for vacuuming
Previous Message Tom Lane 2006-06-23 15:57:13 Re: Documentation of the Front End/Back End Protocol for Large Objects