Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 63FD2475D3B for ; Mon, 9 Sep 2002 16:42:53 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id B20F5475B68 for ; Mon, 9 Sep 2002 16:42:52 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g89KgrKo013609; Mon, 9 Sep 2002 16:42:53 -0400 (EDT) To: Dmitry Morozovsky Cc: Gaetano Mendola , pgsql-admin@postgresql.org Subject: Re: fsync or fdatasync In-reply-to: <20020909200556.R53739-100000@woozle.rinet.ru> References: <20020909200556.R53739-100000@woozle.rinet.ru> Comments: In-reply-to Dmitry Morozovsky message dated "Mon, 09 Sep 2002 20:07:01 +0400" Date: Mon, 09 Sep 2002 16:42:52 -0400 Message-ID: <13608.1031604172@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/95 X-Sequence-Number: 5634 Dmitry Morozovsky writes: > #wal_sync_method = fsync # the default varies across platforms: > # # fsync, fdatasync, open_sync, or open_datasync > I suppose fdatasync *is* the default on platforms where it exists. On > *BSD it does not. [ looks at code... ] Actually, the current algorithm for choosing the default is "open_datasync if it exists, else fdatasync if it exists, else fsync". There probably are platforms where this method yields a non-optimal answer, but we need more data before fooling with it. regards, tom lane