Re: Multiple pq_flush: send() failed: Broken pipe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple pq_flush: send() failed: Broken pipe
Date: 2001-06-13 16:53:08
Message-ID: 27075.992451188@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thalis A. Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-13 16:57:50 Re: pg_dump problem
Previous Message Thalis A. Kalfigopoulos 2001-06-13 16:46:59 Re: Multiple pq_flush: send() failed: Broken pipe