Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 92C3B63382B for ; Mon, 10 May 2010 12:41:30 -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 85448-04 for ; Mon, 10 May 2010 15:41:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com [209.85.217.221]) by mail.postgresql.org (Postfix) with ESMTP id 450AD63383B for ; Mon, 10 May 2010 12:41:23 -0300 (ADT) Received: by gxk21 with SMTP id 21so2822405gxk.14 for ; Mon, 10 May 2010 08:41:22 -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=MT6oKMoxVN6zMjKibXB9ENd1rMeZ7ZZo+QrTkDqIbs4=; b=Py/46XgAeG62of+39LDWBqSoFDhOh1azSzNZhSgKaZqQT0lbId5iosjBDzGamQvPtS h7rSyzO0ztco2vXBqcC7rtckeAZRiHqJaJgg8vwRepZD0ciZ8Sa+fABHkmlIl6tM+/Uq Rc9t+gRWEROp9Rsjq6vAVEaGk+b/gBs/f/gvA= 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=Zvb1EFpIVLBpxCsXX+WREOJqfr0chG67101oGPVd5NAepQxAoSU8aOZaR6nEKXdS6Q AplWkWJumvHQ6YBII9XWfCg3P8t4C0EY9NlzRXmBSitYtuUW2Oh98II7EgXGyxjwSPMp REqwwile4VWhlkCiTiZD4oypcM6u5zsDpS2Ec= MIME-Version: 1.0 Received: by 10.231.149.75 with SMTP id s11mr537851ibv.68.1273506082542; Mon, 10 May 2010 08:41:22 -0700 (PDT) Received: by 10.231.11.11 with HTTP; Mon, 10 May 2010 08:41:22 -0700 (PDT) In-Reply-To: <201005101512.o4AFCZS27089@momjian.us> References: <4BE81CA1.4080201@partiallystapled.com> <201005101512.o4AFCZS27089@momjian.us> Date: Mon, 10 May 2010 11:41:22 -0400 Message-ID: Subject: Re: no universally correct setting for fsync From: Robert Haas To: Bruce Momjian Cc: Michael Tharp , Craig Ringer , 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/468 X-Sequence-Number: 162131 On Mon, May 10, 2010 at 11:12 AM, Bruce Momjian wrote: > Michael Tharp wrote: >> On 05/08/2010 04:07 AM, Craig Ringer wrote: >> > It's probably worth mentioning that people who want to turn off fsync = to >> > gain a performance boost should instead look at a RAID controller with= a >> > BBU so they can safely enable write-back caching, getting most of the >> > benefits of fsync=3Doff safely. >> >> Which options specifically should be set if a BBU is in use? Obviously >> fsync should be on always, but can full_page_writes be disabled? Are >> there other tweaks that can be done? >> >> It would be great to see some practical hints in the documentation while >> the fsync part is getting changed. > > Uh, our docs have: > > =A0 =A0 =A0 =A0Turning this parameter off speeds normal operation, but mi= ght > =A0 =A0 =A0 =A0lead to a corrupt database after an operating system crash= or > =A0 =A0 =A0 =A0power failure. The risks are similar to turning off > =A0 =A0 =A0 =A0fsync, though smaller. =A0It might be safe to = turn > =A0 =A0 =A0 =A0off this parameter if you have hardware (such as a battery= -backed > =A0 =A0 =A0 =A0disk controller) or file-system software that reduces the = risk > =A0 =A0 =A0 =A0of partial page writes to an acceptably low level (e.g., Z= FS). "It might be safe" is a bit of a waffle. It would be nice if we could provide some more clear guidance as to whether it is or is not, or how someone could go about testing their hardware to find out. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company