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

Re: Patch to improve reliability of postgresql on linux nfs

From: Thom Brown <thom(at)linux(dot)com>
To: George Barnett <gbarnett(at)atlassian(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to improve reliability of postgresql on linux nfs
Date: 2011-09-09 08:38:58
Message-ID: CAA-aLv7-fWZuWYEch1ScZFFnktvRgfEjbAy4BFpw=uwN85Z=zA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 9 September 2011 01:04, George Barnett <gbarnett(at)atlassian(dot)com> wrote:
> After looking through the code I found that when postgres calls write() it doesn't retry.  In order to address the issue with the PANIC in the WAL writer I set the sync method to o_sync which solved the issue in that part of the code, however I was still seeing failures in other areas of the code (such as the FileWrite function).  Following this, I spoke to an NFS guru who pointed out that writes under linux are not guaranteed to complete unless you open up O_SYNC or similar on the file handle.

Have you run the test with varying wal_sync_method values?  On Linux
the default is fdatasync because historically Linux hasn't supported
O_DSYNC (a wal_sync_method value of open_datasync).  But I believe as
of Kernel 2.6.33 it does support it.  Have you tried modifying this
parameter in your tests?  Are you even using Linux? (you haven't
specified)

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2011-09-09 09:43:07
Subject: Re: Patch to improve reliability of postgresql on linux nfs
Previous:From: Heikki LinnakangasDate: 2011-09-09 05:57:03
Subject: Re: Large C files

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