Qingqing Zhou <[EMAIL PROTECTED]> writes:

> On Fri, 30 Dec 2005, Tom Lane wrote:
> >
> > I've heard of this in connection with NFS ... is your DB on an NFS
> > filesystem by any chance?
> 
> I have patched IO routines in backend/storage that POSIX says EINTR is
> possible except unlink(). Though POSIX says EINTR is not possible, during
> many regressions, I found it sometimes sets this errno on NFS (I still
> don't know where is the smoking-gun):

Well there is a reason intr is not the default for NFS mounts. It's precisely
because it breaks the traditional unix filesystem interface. Syscalls that
historically are not interruptible become interruptible and not all programs
behave properly when that occurs.

In any case POSIX explicitly allows functions to return other errors aside
from those specified as long as it's for error conditions not listed.

[Chapter 2 Section 3, paragraph 6]

  Implementations may support additional errors not included in this list, may
  generate errors included in this list under circumstances other than those
  described here, or may contain extensions or limitations that prevent some
  errors from occurring. The ERRORS section on each reference page specifies
  whether an error shall be returned, or whether it may be returned.
  Implementations shall not generate a different error number from the ones
  described here for error conditions described in this volume of IEEE Std
  1003.1-2001, but may generate additional errors unless explicitly disallowed
  for a particular function


Ironically EINTR *is* singled out to be specifically forbidden to be returned
from some system calls but only those in the Threads option which are mostly
pthread* functions. unlink isn't covered by that prohibition.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to