pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: pgsql-performance@postgresql.org
Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Date: Mon, 01 Nov 2010 18:03:33 +1300
Message-ID: <4CCE4A25.8050803@catalyst.net.nz> (raw)
In-Reply-To: <4CCDCAA3.4050805@2ndquadrant.com>
References: <AANLkTi=n3zxiLNFhbpiN=JPQPwB=BhXf9iepw1KOEs8U@mail.gmail.com>
	<4CCDCAA3.4050805@2ndquadrant.com>

On 01/11/10 08:59, Greg Smith wrote:
> Marti Raudsepp wrote:
>> Unless fdatasync is unsafe, I'd very much want to see it as the
>> default for 9.1 on Linux (I don't know about other platforms).  I
>> can't see any reasons why each write would need to be sync-ed if I
>> don't commit that often. Increasing wal_buffers probably has the same
>> effect wrt data safety.
>
> Writes only are sync'd out when you do a commit, or the database does 
> a checkpoint.
>
> This issue is a performance difference introduced by a recent change 
> to Linux.  open_datasync support was just added to Linux itself very 
> recently.  It may be more safe than fdatasync on your platform.  As 
> new code it may have bugs so that it doesn't really work at all under 
> heavy load.  No one has really run those tests yet.  See 
> http://wiki.postgresql.org/wiki/Reliable_Writes for some background, 
> and welcome to the fun of being an early adopter.  The warnings in the 
> tuning guide are there for a reason--you're in untested territory 
> now.  I haven't finished validating whether I consider 2.6.32 safe for 
> production use or not yet, and 2.6.36 is a solid year away from being 
> on my list for even considering it as a production database kernel.  
> You should proceed presuming that all writes are unreliable until 
> proven otherwise.
>

Greg,

Your reply is possibly a bit confusingly worded - Marti was suggesting 
that fdatasync be the default - so he wouldn't be a new adopter, since 
this call has been implemented in the kernel for ages. I guess you were 
wanting to stress that *open_datasync* is the new kid, so watch out to 
see if he bites...

Cheers

Mark

view thread (46+ messages)  latest in thread

Message-ID: <4CCE4A25.8050803@catalyst.net.nz>
Permalink:  ../4CCE4A25.8050803@catalyst.net.nz/
Also on:    postgresql.org/message-id/4CCE4A25.8050803@catalyst.net.nz

 · 

reply

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: mark.kirkwood@catalyst.net.nz
  Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
  In-Reply-To: <4CCE4A25.8050803@catalyst.net.nz>

* 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