Re: The unused_oids script should have a reminder to use the 8000-8999 OID range

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: The unused_oids script should have a reminder to use the 8000-8999 OID range
Date: 2019-08-06 03:47:21
Message-ID: 20190806034721.GC32256@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 05, 2019 at 09:00:26PM +0200, Julien Rouhaud wrote:
> Thanks!

What you have committed does that:
+do
+{
+ $suggestion = int(8000 + rand(2000));
+} while (grep(/^$suggestion$/, @{$oids}));
So it would be possible to get 9998-9999 as suggestion. In which
case, one can basically finish with this message:
Suggested random unused OID: 9999 (1 consecutive OID(s) available
starting here)

Wouldn't it be better to keep some room at the end of the allowed
array? Or at least avoid suggesting ranges where there is less than
3-5 OIDs available consecutively.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-08-06 03:50:09 Re: pg can create duplicated index without any errors even warnning
Previous Message Michael Paquier 2019-08-06 03:36:54 Re: Assertion for logically decoding multi inserts into the catalog