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

Re: EINTR error in SunOS

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: EINTR error in SunOS
Date: 2006-01-02 18:58:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Jan 02, 2006 at 08:55:47AM -0700, Doug Royer wrote:
> Doug McNaught wrote:
> >c) treat EINTR as an I/O error (I don't know how easy this would be)
> So then at this point - it is detected, so problem solved?
> If a LOCAL hard drive fails to reply, you hang. Same with hard,intr
> NFS file system.

Not really. If a local hard drive fails to respond, the kernel times
out the request and returns EIO to the app. That's the most annoying
thing about NFS. At least even with reading bad floppies where the
kernel keeps retrying, eventually the read() returns and you can
cancel. With NFS, it never returns if the server never comes back.

The kernel is trying to be helpful by returning EINTR to say "ok, it
didn't complete. There's no error yet but it may yet work". With local
hard drives if they don't respond, you assume they're broken. When NFS
servers don't respond you assume someone has temporarily pulled a
cable and it will come back soon. Huh?

I would vote for the kernel, if the server didn't respond within 5
seconds, to simply return EIO. At least we know how to handle that...

Have a nice day,
Martijn van Oosterhout   <kleptog(at)svana(dot)org>
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to


pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2006-01-02 19:00:21
Subject: Re: What bison versions are installed on buildfarm machines?
Previous:From: Jon JensenDate: 2006-01-02 18:55:53
Subject: Re: Why don't we allow DNS names in pg_hba.conf?

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