Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D4F771337B7B for ; Sun, 31 Oct 2010 20:10:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 54142-10 for ; Sun, 31 Oct 2010 23:10:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.anarazel.de (mail.anarazel.de [217.115.131.40]) by mail.postgresql.org (Postfix) with ESMTP id 77AF01336473 for ; Sun, 31 Oct 2010 20:10:34 -0300 (ADT) Received: from alap2.localnet (unknown [89.204.153.70]) by mail.anarazel.de (Postfix) with ESMTPSA id 0D7E7448009; Mon, 1 Nov 2010 00:10:33 +0100 (CET) From: Andres Freund To: pgsql-performance@postgresql.org Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1? Date: Mon, 1 Nov 2010 00:10:28 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.36-rc6-andres-00006-g4193d91; KDE/4.5.1; x86_64; ; ) Cc: Greg Smith , Marti Raudsepp References: <4CCDCAA3.4050805@2ndquadrant.com> In-Reply-To: <4CCDCAA3.4050805@2ndquadrant.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011010010.28724.andres@anarazel.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/605 X-Sequence-Number: 41023 On Sunday 31 October 2010 20:59:31 Greg Smith wrote: > Writes only are sync'd out when you do a commit, or the database does a > checkpoint. Hm? WAL is written out to disk after an the space provided by wal_buffers(def 8) * XLOG_BLCKSZ (def 8192) is used. The default is 64kb which you reach pretty quickly - especially after a checkpoint. With O_D?SYNC that will synchronously get written out during a normal XLogInsert if hits a page boundary. *Additionally* its gets written out at a commit if sync commit is not on. Not having a real O_DSYNC on linux until recently makes it even more dubious to have it as a default... Andres