Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux