Re: OID Usage
От | Bo Lorentsen |
---|---|
Тема | Re: OID Usage |
Дата | |
Msg-id | 41E81651.1020900@netgroup.dk обсуждение исходный текст |
Ответ на | Re: OID Usage (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
Tom Lane wrote: >The thing you have to worry about is the possibility of duplicate OIDs >once your DB has been running long enough for the OID counter to wrap >around (2^32 OIDs). You should make sure that index is specifically >declared as UNIQUE, so that any attempt to insert a duplicate OID will >fail. That might be enough for you, or you might want to add logic to >your application to retry automatically after such a failure. > > Ahh, yes ... this was what I thought may have be the problem, Not that 2^32 is a small number, but as time goes by on a busy system, this will happened one day. Unique index is a good plan, it will make an error but no data will be harmed then ! How does PG itself handle a search on an duplicated oid, without a index ... return two rows ? Will there be a future substitute for PGoidValue that is more reliable, like a rowid ? Thanks anyway ! /BL
В списке pgsql-general по дате отправления: