Re: OID wraparound (was Re: pg_depend)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: OID wraparound (was Re: pg_depend)
Date: 2001-07-18 23:49:01
Message-ID: 17295.995500141@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Lamar Owen <lamar(dot)owen(at)wgcr(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-07-18 23:55:52 Re: OID wraparound (was Re: pg_depend)
Previous Message Hiroshi Inoue 2001-07-18 23:48:20 Re: OID wraparound (was Re: pg_depend)