Re: Bug in signal handler - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Bug in signal handler
Date
Msg-id 20060511164151.GH30113@svana.org
Whole thread Raw
In response to Re: Bug in signal handler  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug in signal handler  (Florian Weimer <fw@deneb.enyo.de>)
List pgsql-hackers
On Thu, May 11, 2006 at 10:11:00AM -0400, Tom Lane wrote:
> Douglas McNaught <doug@mcnaught.org> writes:
> > I don't disagree with your reasoning, but does POSIX actually say
> > this?
>
> The fact remains that the postmaster has *always* been coded like that,
> and we have *never* seen any problems.  Barring proof that there is a
> problem, I'm uninterested in rewriting it just because someone doesn't
> like it.

It should probably also be remembered that the "fix" would involve either
polling the status by having select() return more often, or using
sigsetjmp/siglongjmp. The cure is definitly worse than the disease.

In a sense the test for errno == EINTR there is redundant since the
backend has arranged that EINTR can never be returned (signals don't
interrupt system calls) and there's a fair bit of code that relies on
that...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [PERFORM] Big IN() clauses etc : feature proposal
Next
From: "Jim C. Nasby"
Date:
Subject: Re: sblock state on FreeBSD 6.1