Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DB5E71337B88 for ; Fri, 5 Nov 2010 18:10:48 -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 14552-08 for ; Fri, 5 Nov 2010 21:10:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mail.postgresql.org (Postfix) with ESMTP id 63DCE1337B92 for ; Fri, 5 Nov 2010 18:10:41 -0300 (ADT) Received: from [75.208.160.232] (232.sub-75-208-160.myvzw.com [75.208.160.232]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MDU2z-1PKDGE1xYT-00Gik1; Fri, 05 Nov 2010 22:10:40 +0100 Message-ID: <4CD472CC.80006@2ndquadrant.com> Date: Fri, 05 Nov 2010 14:10:36 -0700 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Andres Freund CC: pgsql-performance@postgresql.org, Marti Raudsepp Subject: Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1? References: <4CCDCAA3.4050805@2ndquadrant.com> <201011010010.28724.andres@anarazel.de> In-Reply-To: <201011010010.28724.andres@anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:KntlVYYwWqJSWNZbMmmTnjosKBxb7Lt0TrbC5gCHJsm Xu1fuFLuaWDFhuvmRtlgDEpySTLyQFfMV4mX06o6tH1it9Fuy5 0hPNIS6BcCYmzXMycYGj3g7obx5XpOahPm4oCdCMY9z7qndlOX IX+QzP9sOnG6sAJRMmfnvk6INoCINEb9maUpHW/1H8voAlrOhD Ce15hFBTGe/S9gQczzzXcwdELzPOspdZCoTL0/75TE= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/69 X-Sequence-Number: 41093 Andres Freund wrote: > 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. Fair enough; I'm so used to bumping wal_buffers up to 16MB nowadays that I forget sometimes that people actually run with the default where this becomes an important consideration. > Not having a real O_DSYNC on linux until recently makes it even more dubious > to have it as a default... > If Linux is now defining O_DSYNC, and it's buggy, that's going to break more software than just PostgreSQL. It wasn't defined before because it didn't work. If the kernel developers have made changes to claim it's working now, but it doesn't really, I would think they'd consider any reports of actual bugs here as important to fix. There's only so much the database can do in the face of incorrect information reported by the operating system. Anyway, I haven't actually seen reports that proves there's any problem here, I was just pointing out that we haven't seen any positive reports about database stress testing on these kernel versions yet either. The changes here are theoretically the right ones, and defaulting to safe writes that flush out write caches is a long-term good thing. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services and Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books