Re: Long running query - connection and keepalives enabled but query not canceled

2019-06-05 Thread Dmitry Vasiliev
Tomasz Ostrowski wrote:

> The database would get an error on the connection socket only after it tries 
> to read or write to it next time. But it does not try to do this - it's busy 
> counting those quarks until statement_timeout is reached.
> 


It is unfortunate that PostgreSQL does not take into account that the client 
has disconnected and does not need to process query.
I know only one non-stable utility that can solve your problem: 
https://github.com/yandex/odyssey <https://github.com/yandex/odyssey> 
(unfortunately pgbouncer can't do that).

-- 
Dmitry Vasiliev

Re: Long running query - connection and keepalives enabled but query not canceled

2019-06-05 Thread Dmitry Vasiliev


> Tomasz Ostrowski wrote:
> 
>> The database would get an error on the connection socket only after it tries 
>> to read or write to it next time. But it does not try to do this - it's busy 
>> counting those quarks until statement_timeout is reached.
>> 
> 

I found relevant patch from postgrespro on commitfest: 
https://commitfest.postgresql.org/21/1882/

--
Dmitry Vasiliev