Re: oid's and primary keys on insert - Mailing list pgsql-general

From Jean-Luc Lachance
Subject Re: oid's and primary keys on insert
Date
Msg-id 3D5433E6.17416A6C@nsd.ca
Whole thread Raw
In response to oid's and primary keys on insert  (Rob Brown-Bayliss <rob@zoism.org>)
Responses Re: oid's and primary keys on insert  (Curt Sampson <cjs@cynic.net>)
List pgsql-general
Joe Conway wrote:


> There is at least one good reason to not create oids on user tables:
> since they are generated from one source for the entire PostgreSQL
> cluster, in a large installation they can roll-over at 4 billion. By
> using them for system tables only, the concern of roll-over effectively
> goes away.
>
> There have been discussions of making per table oid generators but it
> doesn't look like that will happen for 7.3. I think going to 8 byte oids
> has been rejected to due to the performance hit and additional per row
> overhead.
>

We could have one sequence of OID (4 bytes) per table and a prefix (4
bytes) for a specific table in the system table.  So we could have an
effective OID of 8 bytes and still keep the benefit of system wide
unique OID.

JLL

pgsql-general by date:

Previous
From: Rob Brown-Bayliss
Date:
Subject: Re: oid's and primary keys on insert
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: oid's and primary keys on insert