Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

pg_dump With OIDs Supported?



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


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group