Re: pl/tcl function to detect when a request has been canceled

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pl/tcl function to detect when a request has been canceled
Дата
Msg-id 20180608192154.shvmozcpstpnhlyf@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: pl/tcl function to detect when a request has been canceled  (Peter Da Silva <peter.dasilva@flightaware.com>)
Ответы Re: pl/tcl function to detect when a request has been canceled  (Peter Da Silva <peter.dasilva@flightaware.com>)
Список pgsql-hackers
On 2018-06-08 19:16:49 +0000, Peter Da Silva wrote:
> On 6/8/18, 1:12 PM, "Andres Freund" <andres@anarazel.de> wrote:
>     I'm not terribly opposed to this, but I wonder if the much more
>     pragmatic solution is to just occasionally call a database function that
>     checks this?  You could just run SELECT 1 occasionally :/
> 
> After further discussion with our team:
> 
> Would this work if the reason for it ignoring the cancel request is
> that it is already performing a long-running spi_exec with a large
> response?

Not sure I quite understand what you mean. You're thinking of the case
where you're processing rows one-by-one with a cursor? Or that a single
spi call takes a long while to process the query?

Greetings,

Andres Freund


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

Предыдущее
От: Peter Da Silva
Дата:
Сообщение: Re: pl/tcl function to detect when a request has been canceled
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pl/tcl function to detect when a request has been canceled