Re: Postgres do not allow to create many tables with more than 63-symbols prefix

Поиск
Список
Период
Сортировка
От Önder Kalacı
Тема Re: Postgres do not allow to create many tables with more than 63-symbols prefix
Дата
Msg-id CACawEhWxE3V4L7zU1XD03pO2D7pRUATsmeU2x8C4uYCd4y=Uaw@mail.gmail.com
обсуждение исходный текст
Ответ на Postgres do not allow to create many tables with more than 63-symbols prefix  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
Список pgsql-hackers
Hi,

Thanks for working on this. 

 >> According to subj you can try to create many tables (induced by the case
 >> of partitioned table) with long prefix - see 6727v.sql for reproduction.
 >> But now it's impossible because of logic of the makeUniqueTypeName()
 >> routine.
 >> You get the error:
 >> ERROR:  could not form array type name for type ...
 >>
 >> It is very corner case, of course. But solution is easy and short. So,
 >> why not to fix? - See the patch in attachment.
 >
 > While this seems to be a good improvement, I think it's not a bug.
 > Probably we cannot backpatch it as it will end up having type names
 > defined by different naming rules. I'd suggest discussing it on
 > -hackers.
Done.

On Citus extension, we hit a similar issue while creating partitions (over multiple transactions in parallel). You can see some more discussions on the related Github issue #5334. We basically discuss this behavior on the issue.
 
I tested this patch with the mentioned issue, and as expected the issue is resolved.  

Also, in general, the patch looks reasonable, following the approach that ChooseRelationName() implements makes sense to me as well.

Onder KALACI
Developing the Citus extension @Microsoft

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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Следующее
От: Fabien COELHO
Дата:
Сообщение: Future Postgres 15 and Clang 15