Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Scott Carey <scott(at)richrelevance(dot)com>
Cc: Marti Raudsepp <marti(at)juffo(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Date: 2010-11-08 22:12:57
Message-ID: 4CD875E9.30207@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Scott Carey wrote:
> Im my opinion, the burden of proof lies with those contending that the default value should _change_ from fdatasync to O_DSYNC on linux. If the default changes, all power-fail testing and other reliability tests done prior on a hardware configuration 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(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2010-11-08 22:32:10 Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Previous Message Pierre C 2010-11-08 18:41:53 Re: Select * is very slow