Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0E8B81335B36 for ; Tue, 16 Nov 2010 21:04:48 -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 90307-06 for ; Wed, 17 Nov 2010 01:04:39 +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 8B5F81337B50 for ; Tue, 16 Nov 2010 21:04:39 -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 oAH14SSC011114; Tue, 16 Nov 2010 20:04:28 -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: <201011170201.24782.andres@anarazel.de> References: <201011170130.10720.andres@anarazel.de> <10822.1289955088@sss.pgh.pa.us> <201011170201.24782.andres@anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 17 Nov 2010 02:01:24 +0100" Date: Tue, 16 Nov 2010 20:04:28 -0500 Message-ID: <11113.1289955868@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/276 X-Sequence-Number: 41300 Andres Freund writes: > On Wednesday 17 November 2010 01:51:28 Tom Lane wrote: >> Well, there's a forced fsync after writing the last page of an xlog >> file, but I don't believe that proves that more than 16MB of xlog >> buffers is useless. Other processes could still be busy filling the >> buffers. > Maybe I am missing something, but I think the relevant AdvanceXLInsertBuffer() > is currently called with WALInsertLock held? The fsync is associated with the write, which is not done with insert lock held. We're not quite that dumb. regards, tom lane