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

From: David Ford <david(at)blue-labs(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date: 2001-10-29 20:01:34
Message-ID: 3BDDB59E.60101@blue-labs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>My quibble with David has been about whether the fix is correct in
>detail, not about whether its purpose is correct.
>

My preference is to spin until ! EINTR as soon as possible after the
socket operation. I'm going to seek some advice from kernel people
regarding the inner workings of sockets. I suspect that we'll be able
to get away with handling it like as is done with EINPROGRESS, but
something is nagging me at the back of my head.

In regards to the other signals, I think there is another subtle
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.

So I suspect some tuning needs to be done in respect to SIGPIPE w/ the
backend.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Serguei Mokhov 2001-10-29 20:06:13 Re: Best way for Postrgesql to pass info to java and back again? (PL/Java)
Previous Message Serguei Mokhov 2001-10-29 19:48:06 Re: Cross Database Links