Re: Followup comment for bug report 'postmaster ignores SIGPIPE' [was: Bug#255208: Would help with client aborts, too.] - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Followup comment for bug report 'postmaster ignores SIGPIPE' [was: Bug#255208: Would help with client aborts, too.]
Date
Msg-id 26643.1143390827@sss.pgh.pa.us
Whole thread Raw
In response to Followup comment for bug report 'postmaster ignores SIGPIPE' [was: Bug#255208: Would help with client aborts, too.]  (Martin Pitt <martin@piware.de>)
Responses Re: Followup comment for bug report 'postmaster ignores SIGPIPE' [was: Bug#255208: Would help with client aborts, too.]
List pgsql-bugs
Martin Pitt <martin@piware.de> writes:
> The bug trail in [1] contains a followup from Tom that ignoring
> SIGPIPE is specifically intended. Is there any document which states
> the reason for that?

Allowing SIGPIPE to kill the backend is completely infeasible, as the
backend would be unable to release locks etc before dying.

We have occasionally talked about faking a QueryCancel if we notice
a write failure while sending to the client.  Can't remember at the
moment what the outcome of those discussions was (ie, was there a
good reason not to) --- check the archives.

One point is that doing so doesn't help for queries that aren't
generating a lot of output, eg, updates/deletes.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Martin Pitt
Date:
Subject: Followup comment for bug report 'postmaster ignores SIGPIPE' [was: Bug#255208: Would help with client aborts, too.]
Next
From: Tom Lane
Date:
Subject: Re: Fwd: Bug#358546: failure of pg_ctl start -w -D