| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Douglas McNaught <doug(at)mcnaught(dot)org>, Zdenek Kotala <zdenek(dot)kotala(at)sun(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Bug in signal handler |
| Date: | 2006-05-11 16:41:51 |
| Message-ID: | 20060511164151.GH30113@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, May 11, 2006 at 10:11:00AM -0400, Tom Lane wrote:
> Douglas McNaught <doug(at)mcnaught(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-05-11 17:09:56 | Re: sblock state on FreeBSD 6.1 |
| Previous Message | Greg Stark | 2006-05-11 15:35:34 | Re: [HACKERS] Big IN() clauses etc : feature proposal |