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

From Michael Paquier
Subject Re: The unused_oids script should have a reminder to use the8000-8999 OID range
Date
Msg-id 20190804024803.GB2119@paquier.xyz
Whole thread Raw
In response to Re: The unused_oids script should have a reminder to use the8000-8999 OID range  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: The unused_oids script should have a reminder to use the8000-8999 OID range
List pgsql-hackers
On Sat, Aug 03, 2019 at 11:40:24AM +0200, Julien Rouhaud wrote:
> I probably write less perl than Michael, but it looks just fine to me.

Indentation with pgperltidy complains with the attached diff (based on
top of v4).

+printf "Patches should use a more-or-less consecutive range of OIDs.\n";
"Patches should try to use a consecutive range of OIDs"?

Why choosing a random position within [8000,9999]?  This leads to the
following messages for example with multiple runs, which is confusing:
Suggested random unused OID: 9473 (527 consecutive OID(s) available
Suggested random unused OID: 8159 (31 consecutive OID(s) available
Suggested random unused OID: 9491 (509 consecutive OID(s) available

Wouldn't it be better to choose the lowest position in the development
range, and then adapt the suggestion based on that?  We could
recommend the range if there are at least 10 OIDs available in the
range from the lowest position, and there are few patches eating more
than 5-10 OIDs at once.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: More refactoring for BuildIndexInfo
Next
From: Peter Geoghegan
Date:
Subject: Re: The unused_oids script should have a reminder to use the8000-8999 OID range