Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 094F863340A for ; Fri, 7 May 2010 11:01:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 71067-05 for ; Fri, 7 May 2010 14:00:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 7BDC462F22C for ; Fri, 7 May 2010 11:00:57 -0300 (ADT) Received: by gyg13 with SMTP id 13so602814gyg.19 for ; Fri, 07 May 2010 07:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=POaHlBnl8xbKakO7RYd6Pno+hE8qdLtCrhOi4sHjI7w=; b=G5FdzpWm84w7sYjQEkgRA+y7DajE7u9PbGgU35UNWG7+mHDNOezRmFEGlUVgXKPMFQ pextkZ1W1sn5u1V72CNEzg+t+eJeEcV5d1uc6HKubcxxp9XoQO5/51HD+swb41OIrQfx ywpxJu8dj5HAy0ztRQBB+ge8XbbL8pbvqKXcw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AqH8REtv7dhog8kDcRj/zc64uWwhxkQtoWjKXolWTMXogzncelnOgPNvjHilIz5TXh 5rykdx+lRVoXniyzFU81aywnWVgEmCdbWhJaTyJJ3AwojMflS4ZLTOKbDilwN6FZS5B/ +Ii3HL+wfKwVn4AKE1TJaL/+oujx2vf2ikujE= MIME-Version: 1.0 Received: by 10.231.153.130 with SMTP id k2mr2007419ibw.78.1273240850949; Fri, 07 May 2010 07:00:50 -0700 (PDT) Received: by 10.231.11.11 with HTTP; Fri, 7 May 2010 07:00:50 -0700 (PDT) In-Reply-To: <4BE3D3930200002500031382@gw.wicourts.gov> References: <4BE3D3930200002500031382@gw.wicourts.gov> Date: Fri, 7 May 2010 10:00:50 -0400 Message-ID: Subject: Re: no universally correct setting for fsync From: Robert Haas To: Kevin Grittner Cc: pgsql-hackers@postgresql.org 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/360 X-Sequence-Number: 162023 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#GU= C-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. I've always thought this part of the documentation made setting fsync=3Doff much more reasonable than I feel it to be. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company