Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5439E633AE6 for ; Sun, 14 Feb 2010 16:24:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26851-08 for ; Sun, 14 Feb 2010 20:24:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.enyo.de (mail.enyo.de [212.9.189.167]) by mail.postgresql.org (Postfix) with ESMTP id D3927633AA7 for ; Sun, 14 Feb 2010 16:24:30 -0400 (AST) Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by mail.enyo.de with esmtp id 1Ngl0y-0007vb-NN; Sun, 14 Feb 2010 21:24:24 +0100 Received: from fw by deneb.enyo.de with local (Exim 4.71) (envelope-from ) id 1Ngl0y-0000So-3i; Sun, 14 Feb 2010 21:24:24 +0100 From: Florian Weimer To: Tom Lane Cc: Andres Freund , Greg Stark , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: Re: Faster CREATE DATABASE by delaying fsync References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <407d949e1002140731j85a4f97nc053ec1b0f3cc458@mail.gmail.com> <22295.1266167499@sss.pgh.pa.us> <201002141827.04993.andres@anarazel.de> <22649.1266169035@sss.pgh.pa.us> Date: Sun, 14 Feb 2010 21:24:24 +0100 In-Reply-To: <22649.1266169035@sss.pgh.pa.us> (Tom Lane's message of "Sun, 14 Feb 2010 12:37:15 -0500") Message-ID: <87wryfpnuv.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/1160 X-Sequence-Number: 157503 * Tom Lane: >> Which options would that be? I am not aware that there any for any of the >> recent linux filesystems. > > Shouldn't journaling of metadata be sufficient? You also need to enforce ordering between the directory update and the file update. The file metadata is flushed with fsync(), but the directory isn't. On some systems, all directory operations are synchronous, but not on Linux.