Re: Reset oid , starting value=1 -- Max. Number of OID - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Reset oid , starting value=1 -- Max. Number of OID
Date
Msg-id 20031209195409.GA16791@svana.org
Whole thread Raw
In response to Re: Reset oid , starting value=1 -- Max. Number of OID  ("Gellert, Andre" <AGellert@ElectronicPartner.de>)
List pgsql-general
On Tue, Dec 09, 2003 at 02:52:35PM +0100, Gellert, Andre wrote:
> > The only way to reset oids is to destroy the entire data directory and
> > initdb again. In recent versions you can create tables
> > without oids, thus
> > reducing their usage.
>
> Today we have oid's > 2147483647 , what happens, if we have more than
> allowed ? I remember it was about 4 billions max. oid's, will Postgres
> refresh itself or will it produce errors like "max. records inserted" ???

The OIDs will wrap around, yes. The only real effect is that you run a
really small risk that a CREATE TABLE or some such will fail. Ofcourse, OIDs
will no longer be unique then, but one should never assume they are in the
first place.

> PS: My solution : I moved the applications data to another server ;-) with
> only 1.970.230.087 used OIDs , the application is being fixed at the moment
> (a typecast to int is used on nearly every page).

Are you using it as a primary key?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce

Attachment

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: PSQL 7.4 on debian woody
Next
From: Arjen van der Meijden
Date:
Subject: Re: Making a tree with "millions and millions" of dynamic