Re: EINTR error in SunOS

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: EINTR error in SunOS
Дата
Msg-id 20060102185831.GB20219@svana.org
обсуждение исходный текст
Ответ на Re: EINTR error in SunOS  (Doug Royer <Doug@Royer.com>)
Ответы Re: EINTR error in SunOS  (Doug McNaught <doug@mcnaught.org>)
Re: EINTR error in SunOS  (Greg Stark <gsstark@mit.edu>)
Список 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@svana.org>   http://svana.org/kleptog/
> 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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jon Jensen
Дата:
Сообщение: Re: Why don't we allow DNS names in pg_hba.conf?
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: What bison versions are installed on buildfarm machines?