Re: [patch] helps fe-connect.c handle -EINTR more gracefully

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Ford <david(at)blue-labs(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date: 2001-10-29 21:26:28
Message-ID: 14421.1004390788@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Ford <david(at)blue-labs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashley Cambrell 2001-10-29 21:56:32 Re: Best way for Postrgesql to pass info to java and back again? (PL/Java)
Previous Message Roderick A. Anderson 2001-10-29 21:19:40 Tablespaces