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