Re: OID wraparound: summary and proposal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: OID wraparound: summary and proposal
Date
Msg-id 28871.996715007@sss.pgh.pa.us
Whole thread Raw
In response to OID wraparound: summary and proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
mlw <markw@mohawksoft.com> writes:
> how hard would it be to have an OID range on a per
> table basis?

The existing OID generator is a system-wide counter, and couldn't
reasonably be expected to do something like that.

There was some talk of (in essence) eliminating the present OID
generator mechanism and giving each table its own sequence object for
generating per-table OIDs.  It's an interesting thought, but I'm
concerned about the overhead involved.  At the very least we'd need to
reimplement sequence objects in a lower-overhead fashion (eg, make 'em
rows in a pg_sequence table rather than free-standing almost-tables).

Might be worth doing someday, but I think it's orthogonal to what I'm
proposing at present.  There'd still be a need to suppress OID
generation on tables that don't need OIDs and might have more than
4 billion inserts during their lifetime.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: OID wraparound: summary and proposal
Next
From: Tom Lane
Date:
Subject: Re: Is there a way to drop and restore an index?