Re: Solving the OID-collision problem - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: Solving the OID-collision problem
Date
Msg-id 42F9BBFC.3000704@archonet.com
Whole thread Raw
In response to Re: Solving the OID-collision problem  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
> On Tue, 2005-08-09 at 16:01 +0100, Richard Huxton wrote:
> 
>>Tom Lane wrote:
>>
>>>What if there aren't any "untouched chunks"?  With only 64K-chunk
>>>granularity, I think you'd hit that condition a lot more than you are
>>>hoping.  Also, this seems to assume uniqueness across all tables in an
>>>entire cluster, which is much more than we want; it makes the 32-bit
>>>size of OIDs significantly more worrisome than when they only need to be
>>>unique within a table.
>>
>>Can I ask what happens if we end up re-using a recently de-allocated 
>>OID? Specifically, can a cached plan (e.g. plpgsql function) end up 
>>referring to an object created after it was planned:
>>
>>CREATE FUNCTION f1()... -- oid=1234
>>CREATE FUNCTION f2()... -- oid=1235, calls f1() or oid=1234
>>DROP FUNCTION f1()
>>CREATE FUNCTION f3()... -- re-uses oid=1234
> 
> 
> Possible, but extremely unlikely... you'd have to keep a session open
> with a prepared query for as long as it takes to create a 4 billion
> tables... not a high priority case, eh?

Ah, but it does rule out the possibility of keeping a cache of "recently 
de-allocated" OIDs and re-using those.

--  Richard Huxton  Archonet Ltd


pgsql-hackers by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: Re: Simplifying wal_sync_method
Next
From: Simon Riggs
Date:
Subject: Re: small proposal: pg_config record flag variables?