Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 802861337BE1 for ; Tue, 16 Nov 2010 21:18:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 04107-01-5 for ; Wed, 17 Nov 2010 01:18:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 767F61337B58 for ; Tue, 16 Nov 2010 21:17:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oAH1HhZC011393; Tue, 16 Nov 2010 20:17:43 -0500 (EST) To: Andres Freund cc: pgsql-performance@postgresql.org, Josh Berkus , Greg Smith Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1? In-reply-to: <11113.1289955868@sss.pgh.pa.us> References: <201011170130.10720.andres@anarazel.de> <10822.1289955088@sss.pgh.pa.us> <201011170201.24782.andres@anarazel.de> <11113.1289955868@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 16 Nov 2010 20:04:28 -0500" Date: Tue, 16 Nov 2010 20:17:43 -0500 Message-ID: <11392.1289956663@sss.pgh.pa.us> From: Tom Lane 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: 201011/279 X-Sequence-Number: 41303 I wrote: > The fsync is associated with the write, which is not done with insert > lock held. We're not quite that dumb. But wait --- are you thinking of the call path where a write (and possible fsync) is forced during AdvanceXLInsertBuffer because there's no WAL buffer space left? If so, that's *exactly* the scenario that can be expected to be less common with more buffer space. regards, tom lane