![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
Allowing SIGPIPE to kill the backend is completely infeasible, as the backend would be unable to release locks etc before dying. |
#4
| |||
| |||
|
|
Tom Lane wrote: Allowing SIGPIPE to kill the backend is completely infeasible, as the backend would be unable to release locks etc before dying. So the upshot is really not that ignoring SIGPIPE is specifically intended as the optimal solution but that writing a proper cleanup handler for SIGPIPE seems very difficult. |
#5
| |||
| |||
|
|
Peter Eisentraut <peter_e (AT) gmx (DOT) net> writes: Tom Lane wrote: Allowing SIGPIPE to kill the backend is completely infeasible, as the backend would be unable to release locks etc before dying. So the upshot is really not that ignoring SIGPIPE is specifically intended as the optimal solution but that writing a proper cleanup handler for SIGPIPE seems very difficult. Well, if we did want to change this it would be far easier and safer to do the other thing (ie, set QueryCancel upon noticing a write failure). The question is whether doing either one is really a material improvement, seeing that neither is going to provoke an abort until/unless the backend actually tries to write something to the client. |
#6
| |||
| |||
|
|
On Sun, Mar 26, 2006 at 08:34:46PM -0500, Tom Lane wrote: The question is whether doing either one is really a material improvement, seeing that neither is going to provoke an abort until/unless the backend actually tries to write something to the client. Is there a server equivalent to PQstatus? If there were one, couldn't the server periodically ping the client? |
#7
| |||
| |||
|
|
"Jim C. Nasby" <jnasby (AT) pervasive (DOT) com> writes: On Sun, Mar 26, 2006 at 08:34:46PM -0500, Tom Lane wrote: The question is whether doing either one is really a material improvement, seeing that neither is going to provoke an abort until/unless the backend actually tries to write something to the client. Is there a server equivalent to PQstatus? If there were one, couldn't the server periodically ping the client? No, and do you really want the server stopping its processing of the query just to go see if the client is still alive? This would slow things down and introduce a whole new failure mode, ie, client doesn't answer ping fast enough so its session gets aborted. |
![]() |
| Thread Tools | |
| Display Modes | |
| |