Re: Patch to improve reliability of postgresql on linux nfs
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: George Barnett <gbarnett@atlassian.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-09-09T09:43:07Z
Lists: pgsql-hackers
On fre, 2011-09-09 at 10:04 +1000, George Barnett 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. I've had this problem many years ago. I recall that changing the mount options for NFS also fixed it. Could you post what mount options you are using. (We eventually moved away from NFS at that time, so I didn't pursue it further, but my analysis back then matched yours.)