public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kevin Grittner <[email protected]>
To: Andrew Dunstan <[email protected]>
Cc: [email protected]
Subject: Re: no universally correct setting for fsync
Date: Fri, 07 May 2010 09:48:53 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Andrew Dunstan <[email protected]> wrote:
 
> I think the critical question is really whether you are prepared
> to lose your database.
 
Precisely; and the docs don't make that at all clear.  They mention
the possibility of database corruption, but downplay it:
 
| When fsync is disabled, the operating system is allowed to do its
| best in buffering, ordering, and delaying writes. This can result
| in significantly improved performance. However, if the system
| crashes, the results of the last few committed transactions might
| be lost in part or whole. In the worst case, unrecoverable data
| corruption might occur.

> [valid use case for fsync=off]
> 
> So I think its true that there is no universally right answer.
> Maybe the criteria mentioned in the last para need tweaking some,
> though.
 
I think it goes beyond "tweaking" -- I think we should have a bald
statement like "don't turn this off unless you're OK with losing the
entire contents of the database cluster."  A brief listing of some
cases where that is OK might be illustrative.
 
I never meant to suggest any statement in that section is factually
wrong; it's just all too rosy, leading people to believe it's no big
deal to turn it off.
 
-Kevin



view thread (35+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: no universally correct setting for fsync
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox