Re: 4 billion + oids

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Andrew Bartley <abartley(at)evolvosystems(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 4 billion + oids
Date: 2003-03-24 03:13:13
Message-ID: 20030324031313.GD24823@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 shells for 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(at)svana(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2003-03-24 03:14:07 Re: 4 billion + oids
Previous Message Neil Conway 2003-03-24 03:09:48 Re: 4 billion + oids