Re: no universally correct setting for fsync

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: no universally correct setting for fsync
Date: 2010-05-07 14:03:55
Message-ID: y2t9837222c1005070703lcf89f8agc144d844a7a26c41@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Fri, May 7, 2010 at 16:00, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, May 7, 2010 at 9:47 AM, Kevin Grittner
> <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
>> Someone just posted to the -admin list with a database corrupted
>> while running with fsync=off.  I was all set to refer him to the
>> documentation explaining why he should stop doing this, but to my
>> surprise the documentation waffles on the issue way past what I
>> think is reasonable.
>>
>> http://www.postgresql.org/docs/8.4/interactive/runtime-config-wal.html#GUC-FSYNC
>>
>> There are dire-sounding statements interspersed with:
>>
>> | using fsync results in a performance penalty
>>
>> | Due to the risks involved, there is no universally correct setting
>> | for fsync.
>>
>> | If you trust your operating system, your hardware, and your
>> | utility company (or your battery backup), you can consider
>> | disabling fsync.
>>
>> Isn't this a little too rosy a picture to paint?
>
> I agree.  I've always thought this part of the documentation made
> setting fsync=off much more reasonable than I feel it to be.

+1, definitely. fsync=off should only be done if you *really*
understand what it means, and that requires a lot more explanation
than that...

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2010-05-07 14:24:47 Re: no universally correct setting for fsync
Previous Message Robert Haas 2010-05-07 14:00:50 Re: no universally correct setting for fsync

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-05-07 14:24:47 Re: no universally correct setting for fsync
Previous Message Robert Haas 2010-05-07 14:00:50 Re: no universally correct setting for fsync