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

Поиск
Список
Период
Сортировка
От Robert B. Easter
Тема Restoring old database with OIDs that are now in use by another database after initdb = problems?
Дата
Msg-id 00042815174800.31777@comptechnews
обсуждение исходный текст
Ответ на GTK or TCL/TK ... what do you prefer ? (beginner)  ("Marcel Sierra" <marcel_sierra@hotmail.com>)
Ответы Re: Restoring old database with OIDs that are now in use by another database after initdb = problems?
Список 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@comptechnews.com

В списке pgsql-general по дате отправления:

Предыдущее
От: "Marcel Sierra"
Дата:
Сообщение: GTK or TCL/TK ... what do you prefer ? (beginner)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Restoring old database with OIDs that are now in use by another database after initdb = problems?