Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8A06D632438 for ; Fri, 7 May 2010 11:38:57 -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 38599-02 for ; Fri, 7 May 2010 14:38:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.121]) by mail.postgresql.org (Postfix) with ESMTP id 1FFCC632337 for ; Fri, 7 May 2010 11:38:50 -0300 (ADT) X-Authority-Analysis: v=1.1 cv=sSauFczE/WgqiiCzXA/oBWyKBnhW4IlIwzxEkojSyMI= c=1 sm=0 a=yYfozYec7c4A:10 a=8nJEP1OIZ-IA:10 a=qCTYjJJ2g1SgQhsHZAUATw==:17 a=Qg2BO-ZDkOyELcSXrkcA:9 a=sTWkQ6I-6TrqNHJmaUcA:7 a=pu-EH3Z9Df_cAomhhWdwtQo8SfYA:4 a=wPNLvfGTeEIA:10 a=BWrORfyCEnEpuZd8:21 a=BSInnaTa_IsXYuFQ:21 a=qCTYjJJ2g1SgQhsHZAUATw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 98.27.48.207 Received: from [98.27.48.207] ([98.27.48.207:57153] helo=[192.168.10.103]) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id CE/AA-22191-8F524EB4; Fri, 07 May 2010 14:38:48 +0000 Message-ID: <4BE425F7.30804@dunslane.net> Date: Fri, 07 May 2010 10:38:47 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.0.9-3.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-hackers@postgresql.org Subject: Re: no universally correct setting for fsync References: <4BE3D3930200002500031382@gw.wicourts.gov> In-Reply-To: <4BE3D3930200002500031382@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/364 X-Sequence-Number: 162027 Kevin Grittner wrote: > > 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 think the critical question is really whether you are prepared to lose your database. I have a customer who rotates databases in and out of line, and processes major updates on the out of line database. If they lose the database occasionally they are prepared to wear that risk for the performance gain they get from running with fsync off. It just means that they have to recover and so the inline database will get a bit staler than usual while they do. So I think its true that there is no universally right answer. Maybe the criteria mentioned in the last para need tweaking some, though. It's not just a matter of trusting hardware etc. I have seen mishaps when idiots knock out power cords and the like. The unexpected does sometime happen, despite the best planning. cheers andrew