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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: The unused_oids script should have a reminder to use the8000-8999 OID range
Дата
Msg-id 20190806034721.GC32256@paquier.xyz
обсуждение исходный текст
Ответ на Re: The unused_oids script should have a reminder to use the8000-8999 OID range  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: The unused_oids script should have a reminder to use the8000-8999 OID range  (Peter Geoghegan <pg@bowt.ie>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Assertion for logically decoding multi inserts into the catalog
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg can create duplicated index without any errors even warnning