Re: Re: Multiple pq_flush: send() failed: Broken pipe - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: Multiple pq_flush: send() failed: Broken pipe
Date
Msg-id 28990.992459086@sss.pgh.pa.us
Whole thread Raw
In response to Re: Multiple pq_flush: send() failed: Broken pipe  ("Gregory Wood" <gregw@com-stock.com>)
List pgsql-general
"Gregory Wood" <gregw@com-stock.com> writes:
>> The client might have long since given up and disconnected, but right
>> now the backend won't notice until it finishes the query.

> That has the sound of something that might change in the near future? I'd
> love to automatically have runaway queries killed when the client drops the
> connection...

See followup: what was being discussed a couple days ago was cancelling
the query as soon as send() failure is detected.  That's not a complete
solution, since there's still a problem with the sort of query that
computes for hours before it tries to emit any output.  But it'd be a
big improvement.

Note that since 7.0 or so you can kill a runaway query harmlessly by
sending the backend a SIGINT, even if the client has disconnected.

            regards, tom lane

pgsql-general by date:

Previous
From: Gary DeSorbo
Date:
Subject: INTERSECT AND ORDER BY
Next
From: "David Wall"
Date:
Subject: Vacuum analyze in 7.1.1