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

From Tom Lane
Subject Re: Multiple pq_flush: send() failed: Broken pipe
Date
Msg-id 27075.992451188@sss.pgh.pa.us
Whole thread Raw
In response to Re: Multiple pq_flush: send() failed: Broken pipe  ("Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>)
List pgsql-general
"Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu> writes:
> The truth of the matter is that I have queries that take too long to
> execute and I sometimes interrupt them with ^C. I assume the backend
> dies when the frontend receives this, correct?

If you're using psql, it catches ^C and sends a QueryCancel request to
the backend.  If you're using something else that just aborts the
client, then the backend will finish out the current query before it
notices that the client connection is lost (whereupon it rolls back the
current transaction and quits).  So ^C'ing a simple client isn't the
ideal way to cancel a hugely long query at the moment.

> So if that's the case,
> there is no harm other than that the logfile gets really fat

AFAIK, no problem other than waste of cycles.

We were discussing changing this just a few days ago on pghackers,
however.  7.2 will probably cancel the current query as soon as it
gets the first send() failure.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Does PostgreSQL support EXISTS?
Next
From: Joel Dudley
Date:
Subject: Triggers and SPI, oh my!