Re: Patch to improve reliability of postgresql on linux nfs

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: George Barnett <gbarnett(at)atlassian(dot)com>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, Bernd Helmle <mailings(at)oopsware(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to improve reliability of postgresql on linux nfs
Date: 2011-09-12 12:54:52
Message-ID: 20110912125452.GA14035@staff-mud-56-27.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 12, 2011 at 04:46:53PM +1000, George Barnett wrote:
> On 12/09/2011, at 3:59 PM, Florian Pflug wrote:
>
> > If you really meant to say "intr" there (and not "nointr") then that probably explains the partial writes.
> >
> > Still, I agree with Noah and Kevin that we ought to deal more gracefully with this, i.e. resubmit after a partial read() or write(). AFAICS there's nothing to be gained by not doing that, and the increase in code complexity should be negligible. If we do that, however, I believe we might as well handle EINTR correctly, even if SA_RESTART should prevent us from ever seeing that.
>
>
> Hi Florian,
>
> You are indeed correct. Setting nointr also resolves my issue. I could swear I checked this, but obviously not.
>
> It does still concern me that pgsql did not deal with this as gracefully as other software. I hope the list will consider a patch to resolve that.
>
> Thanks in advance,
>
> George

Hi George,

Many, many, many other software packages expect I/O usage to be the same on
an NFS volume and a local disk volume, including Oracle. Coding every application,
or more likely mis-coding, to handle this gives every application another chance
to get it wrong. If the OS does this, when it gets it right, all of the apps get
it right. I think you should be surprised when other software actually deals with
broken I/O semantics gracefully rather than concerned when one of a pantheon of
programs does not. My two cents.

Regards,
Ken

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-09-12 13:01:07 Re: psql additions
Previous Message Peter Eisentraut 2011-09-12 12:54:39 Re: Patch to improve reliability of postgresql on linux nfs