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 postgresp

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 i

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

2019-06-05 Thread Tomasz Ostrowski
On 6/4/19 6:24 PM, Laurenz Albe wrote: Tomasz Ostrowski wrote: The TCP keepalives functionality on the database server's operating system would figure out that the connection is not working anymore and close it. You'd assume that the database would get the info and cancel the query. Except -

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

2019-06-04 Thread Laurenz Albe
Tomasz Ostrowski wrote: > I have database users which have to run some ad-hoc queries on the > database. These queries sometimes are pretty long running, especially > when a user messes up a join condition for two 1Grows tables and > therefore tries to count the number of quarks in the universe