Re: 4 billion + oids - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: 4 billion + oids
Date
Msg-id 20030324031313.GD24823@svana.org
Whole thread Raw
In response to 4 billion + oids  ("Andrew Bartley" <abartley@evolvosystems.com>)
List pgsql-general
On Mon, Mar 24, 2003 at 01:35:54PM +1100, Andrew Bartley wrote:

> We chew though OIDs very quickly.  At our customers' site, the OID count
> is exceeding 4 billion and wrapping every two weeks (approx.).
>
>   1.. Change all creation of temp tables with "without oids", hoping to reduce the consumption of OIDS

This is your solution. Do oyu use OID anywhere within your application. If
not (you shouldn't be) create all table "without oids". If you stop using
OIDs so rapidly, your problems should go away.

>   2.. Check for the error string "Cannot insert a duplicate key into unique index pg_class_oid_index" in the batch
shellsfor each function call and re-run if required.  

> Can anyone comment if they know this is a fundamental limitation of
> PostgreSQL and if other databases have addressed this problem?  Or
> alternatively, is it a problem with our application that must be
> corrected?

Postgresql uses OIDs for tables and triggers internally. If you don't need
OIDs within your data tables you should be able to reduce your OID usage
considerably.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> IT is not something like pizza that you order in at one o'clock in
> the morning. - John Loebenstein, St George CIO

Attachment

pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: 4 billion + oids
Next
From: Neil Conway
Date:
Subject: Re: 4 billion + oids