Re: The unused_oids script should have a reminder to use the8000-8999 OID range - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: The unused_oids script should have a reminder to use the8000-8999 OID range
Date
Msg-id CAH2-Wzm6V47BvYLkuHtcwdf3u6wpxZL-vOXxt+MtL2ZNKm0tKA@mail.gmail.com
Whole thread Raw
In response to Re: The unused_oids script should have a reminder to use the8000-8999 OID range  (Isaac Morland <isaac.morland@gmail.com>)
List pgsql-hackers
On Fri, Aug 2, 2019 at 2:52 PM Isaac Morland <isaac.morland@gmail.com> wrote:
> Noob question here: why not start with the next unused OID in the range, and on the other hand reserve the range for
sequentially-assignedvalues?
 

The general idea is to avoid OID collisions while a patch is under
development. Choosing a value that aligns nicely with
already-allocated OIDs makes these collisions much more likely, which
commit a6417078 addressed back in March. We want a random choice among
patches, but OIDs used within a patch should be consecutive.

(There is still some chance of a collision, but you have to be fairly
unlucky to have that happen under the system introduced by commit
a6417078.)

It's probably the case that most patches that create a new pg_proc
entry only create one. The question of consecutive OIDs only comes up
with a fairly small number of patches.


--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: The unused_oids script should have a reminder to use the8000-8999 OID range
Next
From: Ivan Panchenko
Date:
Subject: jsonb_plperl bug