Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 90794476626 for ; Tue, 10 Sep 2002 13:28:27 -0400 (EDT) Received: from stine.vestdata.no (stine.vestdata.no [195.204.68.10]) by postgresql.org (Postfix) with ESMTP id 5BC3D4765C6 for ; Tue, 10 Sep 2002 13:28:26 -0400 (EDT) Received: (from ragnark@localhost) by stine.vestdata.no (8.11.6/8.11.2) id g8AHSIS23124; Tue, 10 Sep 2002 19:28:18 +0200 Date: Tue, 10 Sep 2002 19:28:18 +0200 From: =?iso-8859-1?Q?Ragnar_Kj=F8rstad?= To: Bruce Momjian Cc: Gaetano Mendola , pgsql-admin@postgresql.org Subject: Re: fsync or fdatasync Message-ID: <20020910192818.A24188@vestdata.no> References: <20020910180957.Y24188@vestdata.no> <200209101717.g8AHHuV29296@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <200209101717.g8AHHuV29296@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Tue, Sep 10, 2002 at 01:17:56PM -0400 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/112 X-Sequence-Number: 5651 On Tue, Sep 10, 2002 at 01:17:56PM -0400, Bruce Momjian wrote: > Ragnar Kjørstad wrote: > > On Tue, Sep 10, 2002 at 11:40:24AM -0400, Bruce Momjian wrote: > > > We also use > > > O_SYNC on open if it is available. > > > > Why? That will slow tings down... > > Actually, no, we are only O_SYNC'ing the WAL writes and sometimes that > is faster because you are not writing then fsyncing, you are just > writing. The fdatasync only is better than O_SYNC when you are doing > multiple WAL writes before an fdatasync and we normally don't do that. OK, if it is a single write it makes sense. (But I doubt it makes much of a difference - the overhead of a system call is almoust nothing compared to a write to disk...) -- Ragnar Kjørstad