From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, "Rafael Martinez, Guerrero" <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>, SODA Noriyuki <soda(at)sra(dot)co(dot)jp>, pgsql-general(at)postgresql(dot)org, takuya(at)soum(dot)co(dot)jp |
Subject: | Re: "make check" fails over NFS or tmpfs |
Date: | 2006-05-26 13:59:43 |
Message-ID: | 20060526135943.GD27513@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, May 24, 2006 at 12:16:13AM +0200, Florian G. Pflug wrote:
> >BSD signal semantics (what postgres uses) make all system calls
> >restart across signals. Thus, a system call can never return EINTR
> >unless you have non-blocking I/O enabled. These programs would be
> >confused by unexpected EINTRs.
> AFAIK, linux actually abort syscalls when an signal arrives, and it's
> just the libc that restarts them automatically. So, actually, doing
All UNIX OS's do something similar. After all, if you define a signal
handler, the kernel has to return to user space to execute your
handler. All BSD did was always restart the syscall (your loop, though
probably just by fiddling the instruction pointer)) whereas SysV never
did. Nowadays you can choose which way you want it using sigaction().
I think the real lesson is that you can emulate BSD semantics if you
have SysV semantics, but not vice-versa.
> >Postgres doesn't check EINTR on all filesystem system call and thus
> >would be susceptable to the above problem.
> Even if postgres checked for EINTR, what could it possibly do in that case?
> Just retrying wont have any advantage over simply mounting with "nointr" -
> it would still just hang when the nfs-server dies.
Well, it could check whether statement_tineout has passed and return an
error rather than hanging...
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 | Alban Hertroys | 2006-05-26 14:04:27 | Re: Vector type (Re: challenging constraint situation - |
Previous Message | Erik Jones | 2006-05-26 13:58:47 | Re: 8.1.4: Who says "PHP deprecated addslashes since 4.0"? |