Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 519B262F22C for ; Fri, 7 May 2010 11:04:07 -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 72982-01 for ; Fri, 7 May 2010 14:03:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id 34629633B44 for ; Fri, 7 May 2010 11:03:59 -0300 (ADT) Received: by wwb39 with SMTP id 39so820202wwb.19 for ; Fri, 07 May 2010 07:03:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.156.68 with SMTP id l46mr66227wek.99.1273241036947; Fri, 07 May 2010 07:03:56 -0700 (PDT) Received: by 10.216.56.73 with HTTP; Fri, 7 May 2010 07:03:55 -0700 (PDT) In-Reply-To: References: <4BE3D3930200002500031382@gw.wicourts.gov> Date: Fri, 7 May 2010 16:03:55 +0200 Message-ID: Subject: Re: no universally correct setting for fsync From: Magnus Hagander To: Robert Haas Cc: Kevin Grittner , pgsql-hackers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201005/361 X-Sequence-Number: 162024 On Fri, May 7, 2010 at 16:00, Robert Haas wrote: > On Fri, May 7, 2010 at 9:47 AM, Kevin Grittner > wrote: >> Someone just posted to the -admin list with a database corrupted >> while running with fsync=3Doff. =A0I was all set to refer him to the >> documentation explaining why he should stop doing this, but to my >> surprise the documentation waffles on the issue way past what I >> think is reasonable. >> >> http://www.postgresql.org/docs/8.4/interactive/runtime-config-wal.html#G= UC-FSYNC >> >> There are dire-sounding statements interspersed with: >> >> | using fsync results in a performance penalty >> >> | Due to the risks involved, there is no universally correct setting >> | for fsync. >> >> | If you trust your operating system, your hardware, and your >> | utility company (or your battery backup), you can consider >> | disabling fsync. >> >> Isn't this a little too rosy a picture to paint? > > I agree. =A0I've always thought this part of the documentation made > setting fsync=3Doff much more reasonable than I feel it to be. +1, definitely. fsync=3Doff should only be done if you *really* understand what it means, and that requires a lot more explanation than that... --=20 Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/