Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 27160476574 for ; Mon, 10 Jun 2002 18:06:47 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id C0356476AAC for ; Mon, 10 Jun 2002 17:16:29 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g5ALGNb08875; Mon, 10 Jun 2002 17:16:23 -0400 (EDT) To: Tim Ellis Cc: pgsql-admin@postgresql.org Subject: Re: FAQ Q In-reply-to: <20020610124654.44d7b7fb.Tim.Ellis@gamet.com> References: <20020610124654.44d7b7fb.Tim.Ellis@gamet.com> Comments: In-reply-to Tim Ellis message dated "Mon, 10 Jun 2002 12:46:54 -0700" Date: Mon, 10 Jun 2002 17:16:23 -0400 Message-ID: <8872.1023743783@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200206/66 X-Sequence-Number: 4501 Tim Ellis writes: > (in summation...) So if data consistency is the most important thing to > me, performance be damned, I still, as of 7.2.1, want to run in fsync > mode? Yup. no-fsync is only suitable if you trust your OS and power supply. You do not have to trust Postgres itself: in all cases we push the log entries out to the OS before declaring a transaction committed. The question at hand is whether we use fsync() or other methods to try to force the OS to write to disk before we report the transaction committed. Without that, a system-level crash immediately after a commit report might mean the "committed" transaction isn't reflected as committed on disk. The performance cost of fsync is not nearly what it used to be pre-7.1, btw, because we need flush only the WAL log file not data files. (In case of a crash, any missing data-file updates will be reconstructed from the recent WAL entries during restart.) So the needed disk head movement is a lot less than it used to be --- especially if you've arranged for pg_xlog to live on its own disk. I don't think there's any longer a good argument for considering no-fsync in production servers, even though you might well still choose it for development systems. regards, tom lane