X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 951C311F6262 for ; Thu, 27 Apr 2006 11:58:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 39188-03 for ; Thu, 27 Apr 2006 11:57:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2F8EF11F60AE for ; Thu, 27 Apr 2006 11:57:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3REvkW5011143; Thu, 27 Apr 2006 10:57:46 -0400 (EDT) To: Simon Riggs cc: guoping.zhang@nec.com.au, pgsql-performance@postgresql.org, "Guoping Zhang (E-mail)" Subject: Re: how unsafe (or worst scenarios) when setting fsync In-reply-to: <1146121984.3120.56.camel@localhost.localdomain> References: <003b01c669c4$34bbd7b0$74304c93@eddy> <1146121984.3120.56.camel@localhost.localdomain> Comments: In-reply-to Simon Riggs message dated "Thu, 27 Apr 2006 08:13:04 +0100" Date: Thu, 27 Apr 2006 10:57:46 -0400 Message-ID: <11142.1146149866@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/646 X-Sequence-Number: 18730 Simon Riggs writes: > On Thu, 2006-04-27 at 16:31 +1000, Guoping Zhang wrote: >> Can we set fsync OFF for the performance benefit, have the risk of only 5 >> minutes data loss or much worse? > Thats up to you. > fsync can be turned on and off, so you can make critical changes with > fsync on, then continue with fsync off. I think it would be a mistake to assume that the behavior would be nice clean "we only lost recent changes". Things could get arbitrarily badly corrupted if some writes make it to disk and some don't. regards, tom lane