Re: Patch to improve reliability of postgresql on linux nfs

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Noah Misch" <noah(at)leadboat(dot)com>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "George Barnett" <gbarnett(at)atlassian(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to improve reliability of postgresql on linux nfs
Date: 2011-09-09 18:38:08
Message-ID: 4E6A16C0020000250004105A@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Noah Misch <noah(at)leadboat(dot)com> wrote:

> We shouldn't complain when a kernel provides a conforming write(),
> even if it appears that the kernel achieved little by using some
> freedom afforded it.

I remember we had some compiler warnings in the logging area because
we were making the assumption that no implementation would ever use
that freedom. I suggested we replace the simple, unchecked calls to
write with a function which did what we expected through an API
conforming loop:

http://archives.postgresql.org/pgsql-hackers/2011-02/msg01719.php

The response was that we could ignore the documented API because we
had "never seen nor heard of it being true for writes to disk
files". I'm still uncomfortable with that. Where I have seen
people code to implementation details rather than the documented
API, it has often not turned out well in the long run.

I'd still be willing to put together a patch for that if people buy
into it.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-09-09 18:46:51 Re: fsyncing data to disk
Previous Message Nulik Nol 2011-09-09 18:15:40 fsyncing data to disk