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

From David Ford
Subject Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Date
Msg-id 3BDDB59E.60101@blue-labs.org
Whole thread Raw
In response to Re: [patch] helps fe-connect.c handle -EINTR more gracefully  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [patch] helps fe-connect.c handle -EINTR more gracefully
List 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




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Old backend/frontend protocol versions
Next
From: "Serguei Mokhov"
Date:
Subject: Re: Best way for Postrgesql to pass info to java and back again? (PL/Java)