Re: [SQL] maximum number of rows in table - what about oid limits?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "jmscott(at)yahoo(dot)com" <jmscott(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] maximum number of rows in table - what about oid limits?
Date: 2001-06-06 17:55:43
Message-ID: Pine.BSF.4.21.0106061050520.16377-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


On 6 Jun 2001, jmscott(at)REMOVEMEyahoo(dot)com wrote:

> postgresql docs claim an essentially unlimited number of
> rows per table.
>
> http://postgresql.crimelabs.net/users-lounge/limitations.html
>
> this doesn't make sense if each row has an oid.
> do more subtle side effects exist if the oid wraps?

In general, unless you're relying on unique oids, you should be fine.
You probably don't want to use oid as a unique key in your tables for that
reason. Of course, sequences aren't sufficient either (also being
int4) but some kind of int8 "sequence" mechanism would do it if you expect
more than the int4 number of rows.

You might have problems with creating system table entries with unique
oids after wraparound, but generally that can be fixed by trying again.
(Some of the system tables have a unique index on oid).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fran Fabrizio 2001-06-06 17:56:47 Re: "trigger"ing a procedure every X minutes
Previous Message Andy Jenks 2001-06-06 17:52:52 ideas on optimization

Browse pgsql-sql by date

  From Date Subject
Next Message John Scott 2001-06-06 18:45:08 Re: [SQL] maximum number of rows in table - what about oid limits?
Previous Message DI Hasenöhrl 2001-06-06 17:53:58 How to create a *pass-through-query* in postgresql