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

From Önder Kalacı
Subject Re: Postgres do not allow to create many tables with more than 63-symbols prefix
Date
Msg-id CACawEhWxE3V4L7zU1XD03pO2D7pRUATsmeU2x8C4uYCd4y=Uaw@mail.gmail.com
Whole thread Raw
In response to Postgres do not allow to create many tables with more than 63-symbols prefix  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
List 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 by date:

Previous
From: John Naylor
Date:
Subject: Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Next
From: Fabien COELHO
Date:
Subject: Future Postgres 15 and Clang 15