Restoring old database with OIDs that are now in use by another database after initdb = problems?

From: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Restoring old database with OIDs that are now in use by another database after initdb = problems?
Date: 2000-04-28 18:41:37
Message-ID: 00042815174800.31777@comptechnews
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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(at)comptechnews(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2000-04-28 19:56:05 Re: Restoring old database with OIDs that are now in use by another database after initdb = problems?
Previous Message Marcel Sierra 2000-04-28 16:56:47 GTK or TCL/TK ... what do you prefer ? (beginner)