Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A1C54632208 for ; Fri, 18 Jun 2010 03:03:12 -0300 (ADT) 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 55806-06 for ; Fri, 18 Jun 2010 06:03:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id 5BA1C6302CB for ; Fri, 18 Jun 2010 03:03:05 -0300 (ADT) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Mdo4b-1ObONa2GD7-00Pfeq; Fri, 18 Jun 2010 08:03:00 +0200 Message-ID: <4C1B0C11.1010204@2ndquadrant.com> Date: Fri, 18 Jun 2010 02:02:57 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Mark Mielke CC: Mark Kirkwood , pgsql-performance@postgresql.org Subject: Re: wal_synch_method = open_sync safe on RHEL 5.5? References: <4C1ACE5F.1080802@catalyst.net.nz> <4C1AE820.6020506@2ndquadrant.com> <4C1AE9A3.4080307@mark.mielke.cc> In-Reply-To: <4C1AE9A3.4080307@mark.mielke.cc> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19s5O3Z8kdrRV7xjmVAcR/y63EndLxGtc/X7J1 Wa6MehjsQdlRS98D5TBCiOe4w1q4s1MFxFKkHYxy4gQ+4lBCji 897DXc9ohODG0txwRA2hiqNJmXsw9bh X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/329 X-Sequence-Number: 39185 Mark Mielke wrote: > The conclusion I read was that Linux O_SYNC behaves like O_DSYNC on > other systems. For WAL, this seems satisfactory? It would be if it didn't have any bugs or limitiations, but it does. The one pointed out in the message I linked to suggests that a mix of buffered and O_SYNC direct I/O can cause a write error, with the exact behavior you get depending on the kernel version. That's a path better not explored as I see it. The kernels that have made some effort to implement this correctly actually expose O_DSYNC, on newer Linux systems. My current opinion is that if you only have Linux O_SYNC, don't use it. The ones with O_DSYNC haven't been around for long enough to be proven or disproven as effective yet. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us