Prevent internal error at concurrent CREATE OR REPLACE FUNCTION

Поиск
Список
Период
Сортировка
От Yugo Nagata
Тема Prevent internal error at concurrent CREATE OR REPLACE FUNCTION
Дата
Msg-id 20250331200057.00a62760966a821d484ea904@sraoss.co.jp
обсуждение исходный текст
Ответы Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION
Список pgsql-hackers
Hi,

I found that multiple sessions concurrently execute CREATE OR REPLACE FUNCTION
for a same function, the error "tuple concurrently updated" is raised. This is
an internal error output by elog, also the message is not user-friendly.

I've attached a patch to prevent this internal error by locking an exclusive
lock before the command and get the read tuple after acquiring the lock.
Also, if the function has been removed during the lock waiting, the new entry
is created.

Regards,
Yugo Nagata

-- 
Yugo Nagata <nagata@sraoss.co.jp>

Вложения

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