Re: Restoring old database with OIDs that are now in use by another database after initdb = problems?
От | Bruce Momjian |
---|---|
Тема | Re: Restoring old database with OIDs that are now in use by another database after initdb = problems? |
Дата | |
Msg-id | 200004281956.PAA10822@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Restoring old database with OIDs that are now in use by another database after initdb = problems? ("Robert B. Easter" <reaster@comptechnews.com>) |
Список | 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? Having duplicates in different tables really is not a problem. > > 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. > My book has a chapter on this: http://www.postgresql.org/docs/awbook.html -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: