Re: [patch] helps fe-connect.c handle -EINTR more gracefully - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date
Msg-id 14421.1004390788@sss.pgh.pa.us
Whole thread Raw
In response to Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (David Ford <david@blue-labs.org>)
Responses Re: [patch] helps fe-connect.c handle -EINTR more gracefully
List pgsql-hackers
David Ford <david@blue-labs.org> writes:
> problem.  Remember a month ago when I had a huge database that I had to 
> upgrade, I had no disk space to export it to and when the old version of 
> psql ran out of memory it crashed?  The backend continued to push query 
> data out the closed pipe until the backend was forcibly closed or the 
> query completed.  Naturally this  caused considerable spammage on the 
> console.

This has been discussed before.  Don't bother proposing that backends
should use the default handling of SIGPIPE, because that won't be
accepted.  A safe limited solution would be to keep backend libpq from
emitting multiple consecutive "broken pipe" reports to stderr.
A better-sounding solution that might have unforeseen side effects
is to set QueryCancel as soon as we see a nonrecoverable-looking
send() error.  This is on the TODO list but no one's gotten round to
doing anything about it yet.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Ashley Cambrell
Date:
Subject: Re: Best way for Postrgesql to pass info to java and back again? (PL/Java)
Next
From: Lamar Owen
Date:
Subject: Re: 7.2b1 ...