Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION

Поиск
Список
Период
Сортировка
От Daniil Davydov
Тема Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION
Дата
Msg-id CAJDiXgjXcLVwtH3qG4T8RtyBzpuiGHM0WizYf_iXWS70Jk8jwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION  (Yugo Nagata <nagata@sraoss.co.jp>)
Список pgsql-hackers
Hi,

On Tue, Sep 30, 2025 at 9:02 AM Yugo Nagata <nagata@sraoss.co.jp> wrote:
>
> I've attached rebase patches.
>

It seems redundant to me that in CatalogIndexInsert we first check the
unique constraint, and then pass the UNIQUE_CHECK_YES parameter
to the index_insert function call below. As far as I understand, after
check_unique_constraint we can be sure that everything is okay with
inserted values.  Am I missing something?

Also, why should we add "IsCatalogRelation(heapRelation)" check inside
the CatalogIndexInsert function? We know for sure that a given table is a
catalog relation.

BTW, what do you think about adding an isolation test for a concurrent
"CREATE OR REPLACE FUNCTION" command? This is one of the
'problems' we're struggling with, but I don't see this case  being explicitly
tested anywhere.

All other changes look good to me.

--
Best regards,
Daniil Davydov



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