Skip site navigation (1) Skip section navigation (2)

Re: EINTR error in SunOS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: EINTR error in SunOS
Date: 2006-01-02 01:14:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Let me give you a sky-high view of this.  Database reliability requires
that the disk drive be 100% reliable.  If any part of the disk storage
fails (I/O write failure, NFS failure) we have to assume that the disk
storage is corrupt and the database needs to be restored from backup. 
The NFS failure modes seem to suggest that any kind of NFS failure makes
our storage suspect, meaning we want NFS to be as non-failure mode as
possible.  Making PostgreSQL work on NFS system itself is risky, and
allowing it to work on systems that will soft-failure on writes seems
even worse.


Doug McNaught wrote:
> Doug Royer <Doug(at)Royer(dot)com> writes:
> >  From the Linux 'nfs' man page:
> >
> >   intr           If  an  NFS file operation has a major timeout and it is
> >                  hard mounted, then allow signals to  interupt  the  file
> >                  operation  and  cause  it to return EINTR to the calling
> >                  program.  The default is to not allow file operations to
> >                  be interrupted.
> >
> > Solaris 'mount_nfs' man page
> >
> >   intr | nointr
> >                  Allow (do not allow) keyboard interrupts to kill
> >                  a  process  that  is  hung  while  waiting for a
> >                  response on  a  hard-mounted  file  system.  The
> >                  default  is  intr,  which  makes it possible for
> >                  clients to interrupt applications  that  may  be
> >                  waiting for a remote mount.
> >
> > The Solaris and Linux defaults seem to be the opposite of each other.
> Actually they're the same, though differently worded.  "Major timeout"
> means the server has not responded for N milliseconds, not that the
> client has decided to time out the request.  If 'hard' is set, the
> client will keep trying indefinitely, though you can interrupt it if
> you've specified 'intr'.
> > So I think we are saying the same thing.
> >
> > You can get EINTR with hard+intr mounts.
> Yes, *only* if the user specifically decides to send a signal, or if
> it uses SIGALRM or whatever.  I agree that if you expect 'intr' to be
> used, your code needs to handle EINTR.
> > I am not sure what you get with soft mounts on a timeout.
> The Linux manpage implies you get EIO.
> -Doug
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2006-01-02 01:15:52
Subject: Re: Checks for command string
Previous:From: Bruce MomjianDate: 2006-01-02 01:11:27
Subject: Re: Checks for command string

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group