Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id ADEDB63280B for ; Mon, 10 May 2010 12:12:47 -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 84656-07 for ; Mon, 10 May 2010 15:12:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id A090D6325B9 for ; Mon, 10 May 2010 12:12:40 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o4AFCZS27089; Mon, 10 May 2010 11:12:35 -0400 (EDT) From: Bruce Momjian Message-Id: <201005101512.o4AFCZS27089@momjian.us> Subject: Re: no universally correct setting for fsync In-Reply-To: <4BE81CA1.4080201@partiallystapled.com> To: Michael Tharp Date: Mon, 10 May 2010 11:12:35 -0400 (EDT) CC: Craig Ringer , pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/464 X-Sequence-Number: 162127 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=off 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: Turning this parameter off speeds normal operation, but might lead to a corrupt database after an operating system crash or power failure. The risks are similar to turning off fsync, though smaller. It might be safe to turn off this parameter if you have hardware (such as a battery-backed disk controller) or file-system software that reduces the risk of partial page writes to an acceptably low level (e.g., ZFS). -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com