Re: BUG #16634: Conflicting names of indexes for partitioned tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16634: Conflicting names of indexes for partitioned tables
Дата
Msg-id 1615413.1600956534@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16634: Conflicting names of indexes for partitioned tables  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16634: Conflicting names of indexes for partitioned tables  (Michał Albrycht <michalalbrycht@gmail.com>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I think that whole problem is caused by auto-generated name for index for
> partition tables. For parent table postgres is using name provided by user,
> but for children tables it generates names automatically from name of the
> table and fields that are used for index. But when we create index on
> function it uses just function name. So for both indexes it generates name
> like `child_1_lower_idx` despite the fact that one index is using
> `lower(name)` and second one is using `lower(surname)`.
> Why did it work with single thread? Apparently there is mechanism that tries
> to solve conflicts as first index will get name: child_1_lower_idx and
> second one will get child_1_lower_idx1 but for some reason this will not
> work when indexes are created in parallel sessions.

Well, it won't work reliably anyway; that's inherent to the problem.
There's nothing here that's specific to partitioned tables, and I'm
afraid the answer is "don't do that".  It's not very hard to find
other examples where parallel creation of objects can hit conflicts.

            regards, tom lane



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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: mysql-fdw fail
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: BUG #16632: Not a bug, just a typo