Re: [HACKERS] Optional message to user when terminating/cancellingbackend

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Дата
Msg-id 48DEF94C-FC80-45D6-9E85-AC7448C9738C@yesql.se
обсуждение исходный текст
Ответ на Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Список pgsql-hackers
> On 24 Aug 2018, at 03:37, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Thomas Munro <thomas.munro@enterprisedb.com> writes:
>> On Fri, Aug 24, 2018 at 6:53 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I think this is just a timing problem: the signal gets sent,
>>> but it might or might not get received before the current statement ends.
>
>> How about we just wait forever if the function manages to return?
>> select case when pg_cancel_backend(pg_backend_pid(), '...') then
>> pg_sleep('infinity') end;
>
> Hm, that might work.  I'd pick a long but not infinite timeout --- maybe
> 60 sec would be good.

I like that idea, so I’ve updated the patch to see what the cfbot thinks of it.

cheers ./daniel


Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Fix help option of contrib/oid2name
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [HACKERS] Optional message to user when terminating/cancellingbackend