Search Postgresql Archives

Re: Statement timeout not working on broken connections with active queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Brendan O'Shea" <brendanoshea@xxxxxxxxxxx> writes:
> We have discovered a situation where the statement_timeout is not =
> honored for broken connections.  If a connection is in the process of =
> returning results to the client and the connection is severed (for =
> example, network cable on client is unplugged) then the query continues =
> to run on the server even after the statement_timeout is exceeded.

Well, the backend is blocked on a write() to the socket and cannot abort
that without bollixing the connection completely (i.e., loss of message
synchronization).  So I think waiting until the TCP stack declares
failure is an appropriate response.  If you want faster TCP failure,
see whether your TCP stack allows timeout adjustments.

Note that the query is not "running" in the sense of consuming any
meaningful CPU or I/O resources in this state ...

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux