Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1? - Mailing list pgsql-performance

From Greg Smith
Subject Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Date
Msg-id 4CD875E9.30207@2ndquadrant.com
Whole thread Raw
In response to Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?  (Scott Carey <scott@richrelevance.com>)
Responses Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
List pgsql-performance
Scott Carey wrote:
> Im my opinion, the burden of proof lies with those contending that the default value should _change_ from fdatasync
toO_DSYNC on linux.  If the default changes, all power-fail testing and other reliability tests done prior on a
hardwareconfiguration may become invalid without users even knowing. 
>

This seems to be ignoring the fact that unless you either added a
non-volatile cache or specifically turned off all write caching on your
drives, the results of all power-fail testing done on earlier versions
of Linux was that it failed.  The default configuration of PostgreSQL on
Linux has been that any user who has a simple SATA drive gets unsafe
writes, unless they go out of their way to prevent them.

Whatever newer kernels do by default cannot be worse.  The open question
is whether it's still broken, in which case we might as well favor the
known buggy behavior rather than the new one, or whether everything has
improved enough to no longer be unsafe with the new defaults.

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services and Support        www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books


pgsql-performance by date:

Previous
From: Klaus Ita
Date:
Subject: Re: Running PostgreSQL as fast as possible no matter the consequences
Next
From: Andres Freund
Date:
Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?