I'm wondering what would happen if I were to backup/archive an old
database with OIDs, then later someday, restore it after I've since done an
initdb and there is someother database using the same OIDs as the old database.
If I restore with OIDs, that would cause the OIDs to not be unique within
the entire data directory. Would PostgreSQL have any problems with this? If
PostgreSQL references all data by OID internally, then this would cause an OID
to reference more than one object - a possible ambiquity?
I'm trying to decide whether to use OIDs or sequences for unique ids. I want
to use the method that will work most reliably. Trouble free backup and
restore is very important. OIDs look good since they are always there so they
are simple and there's little you can do to misconfigure them.
Serials/sequences might be better if I need sequential numbers but I don't
really - just unique is good enough. Again, I want to use what is simplest
but more importantly, that stands the best chance of not being corrupted
during backup/restore.
Any caveats or experiences anyone can share would be great!
Robert B. Easter
reaster@comptechnews.com