From owner-freebsd-questions@FreeBSD.ORG Tue Oct 26 19:07:11 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5F5F1065673 for ; Tue, 26 Oct 2010 19:07:11 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 64D788FC18 for ; Tue, 26 Oct 2010 19:07:11 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id B52A8E8057; Tue, 26 Oct 2010 20:07:10 +0100 (BST) Received: from unknown (client-81-107-142-135.midd.adsl.virginmedia.com [81.107.142.135]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Tue, 26 Oct 2010 20:07:09 +0100 (BST) Date: Tue, 26 Oct 2010 20:07:05 +0100 From: Bruce Cran To: "Marc G. Fournier" Message-ID: <20101026200705.000006d1@unknown> In-Reply-To: References: X-Mailer: Claws Mail 3.7.6 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: fsync: Linux vs FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 19:07:11 -0000 On Tue, 26 Oct 2010 15:33:52 -0300 (ADT) "Marc G. Fournier" 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