Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 2010 20:07:05 +0100
From:      Bruce Cran <bruce@cran.org.uk>
To:        "Marc G. Fournier" <scrappy@hub.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: fsync: Linux vs FreeBSD
Message-ID:  <20101026200705.000006d1@unknown>
In-Reply-To: <alpine.BSF.2.00.1010261530200.39682@hub.org>
References:  <alpine.BSF.2.00.1010261530200.39682@hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 26 Oct 2010 15:33:52 -0300 (ADT)
"Marc G. Fournier" <scrappy@hub.org> wrote:

> 
> Someone recently posted on one of the PostgreSQL Blogs concerning
> fsync on Linux/Windows/Mac OS X, but failed to make any comments on
> any of the BSDs ... the post has to do with how fsync works on the
> various OSs, and am curious as to whether or not this is something
> that also afflicts us:
> 
> http://rhaas.blogspot.com/2010/10/wal-reliability.html
> 
> >From reading our man page, I see no warnings similar to what the
> >other OSs 
> have, specifically:
> 
> Mac OS X: For applications that require tighter guarantees about the
>            integrity of their data, Mac OS X provides the F_FULLFSYNC
> fcntl
> 
> Linux: If the underlying hard disk has write caching enabled, then the
>         data may not really be on permanent storage when fsync() /
>         fdatasync() return.
> 
> So, do we hide the fact, or are, in fact, not afflicted by this?

Yes, it is a problem:

http://leaf.dragonflybsd.org/mailarchive/kernel/2010-01/msg00007.html

There also a paragraph on write cache and filesystem integrity in da(4):

http://www.freebsd.org/cgi/man.cgi?query=da&apropos=0&sektion=0&manpath=FreeBSD+8.1-RELEASE&format=html

-- 
Bruce Cran



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101026200705.000006d1>