From: Andres Freund <andres@anarazel.de>
To: Greg Smith <greg@2ndquadrant.com>
Cc: Scott Carey <scott@richrelevance.com>
Cc: Marti Raudsepp <marti@juffo.org>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Date: Mon, 8 Nov 2010 23:32:10 +0100
Message-ID: <201011082332.11236.andres@anarazel.de> (raw)
In-Reply-To: <4CD875E9.30207@2ndquadrant.com>
References: <AANLkTi=n3zxiLNFhbpiN=JPQPwB=BhXf9iepw1KOEs8U@mail.gmail.com>
<9D7DB2F2-683B-480C-B781-8D282A280E35@richrelevance.com>
<4CD875E9.30207@2ndquadrant.com>
Hi,
On Monday 08 November 2010 23:12:57 Greg Smith wrote:
> 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.
Which is about *no* argument in favor of any of the options, right?
> 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.
Either I majorly misunderstand you, or ... I dont know.
There simply *is* no new implementation relevant for this discussion. Full
Stop. What changed is that O_DSYNC is defined differently from O_SYNC these days
and O_SYNC actually does what it should. Which causes pg to move open_datasync
first in the preference list doing what the option with the lowest preference
did up to now.
That does not *at all* change the earlier fdatasync() or fsync()
implementations/tests. It simply makes open_datasync the default doing what
open_sync did earlier.
For that note that open_sync was the method of *least* preference till now...
And that fdatasync() thus was the default till now. Which it is not anymore.
I don't argue *at all* that we have to test the change moving fdatasync before
open_datasync on the *other* operating systems. What I completely don't get is
all that talking about data consistency on linux. Its simply irrelevant in
that context.
Andres
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andres@anarazel.de, greg@2ndquadrant.com, scott@richrelevance.com, marti@juffo.org
Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
In-Reply-To: <201011082332.11236.andres@anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox