Re: Patch to improve reliability of postgresql on linux nfs

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: Florian Pflug <fgp(at)phlo(dot)org>, George Barnett <gbarnett(at)atlassian(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to improve reliability of postgresql on linux nfs
Date: 2012-08-16 00:45:40
Message-ID: 20120816004540.GD8353@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 13, 2011 at 10:32:01AM -0400, Aidan Van Dyk wrote:
> On Tue, Sep 13, 2011 at 10:14 AM, Florian Pflug <fgp(at)phlo(dot)org> wrote:
>
> >> Personally, I'ld think that's ripe for bugs.   If the contract is that
> >> ret != amount is the "error" case, then don't return -1 for an error
> >> *sometimes*.
> >
> > Hm, but isn't that how write() works also? AFAIK (non-interruptible) write()
> > will return the number of bytes written, which may be less than the requested
> > number if there's not enough free space, or -1 in case of an error like
> > an invalid fd being passed.
>
> Looking through the code, it appears as if all the write calls I've
> seen are checking ret != amount, so it's probably not as big a deal
> for PG as I fear...
>
> But the subtle change in semantics (from system write ret != amount
> not necessarily a real error, hence no errno set) of pg_write ret !=
> amount only happening after a "real error" (errno should be set) is
> one that could yet lead to confusion.

I assume there is no TODO here.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-08-16 00:52:45 Re: SSL key with passphrase
Previous Message Bruce Momjian 2012-08-16 00:43:25 Re: xlog file naming