Re: OID wraparound (was Re: pg_depend) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: OID wraparound (was Re: pg_depend)
Date
Msg-id 17295.995500141@sss.pgh.pa.us
Whole thread Raw
In response to Re: OID wraparound (was Re: pg_depend)  (Lamar Owen <lamar.owen@wgcr.org>)
Responses Re: OID wraparound (was Re: pg_depend)
List pgsql-hackers
Lamar Owen <lamar.owen@wgcr.org> writes:
> Now for a question:  OID creation seems to be a low-overhead task. Is the 
> creation of SERIAL PRIMARY KEY values as efficient?  Or will we be shooting 
> ourselves in the performance foot if frequently-accessed system tables go 
> from OID usage to SERIAL PRIMARY KEY usage?

Yes, nowhere near, and yes.  Sequence objects require disk I/O to
update; the OID counter essentially lives in shared memory, and can
be bumped for the price of a spinlock access.

I don't think we should discourage use of OIDs quite as vigorously
as you propose ;-).  All I want is to not expend OIDs on things that
have no need for one.  That, together with clarifying exactly how
unique OIDs should be expected to be, seems to me that it will solve
99% of the problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: OID wraparound (was Re: pg_depend)
Next
From: Jan Wieck
Date:
Subject: Re: MySQL Gemini code