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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Optional message to user when terminating/cancelling backend
Дата
Msg-id 24017.1535074672@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Список pgsql-hackers
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.

            regards, tom lane


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Re: Improve OR conditions on joined columns (commonstar schema problem)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)