Re: fsync or fdatasync - Mailing list pgsql-admin

From Ragnar Kjørstad
Subject Re: fsync or fdatasync
Date
Msg-id 20020910192818.A24188@vestdata.no
Whole thread Raw
In response to Re: fsync or fdatasync  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: fsync or fdatasync
Next
From: "Paul Tuohy"
Date:
Subject: pg_restore : ident authentication problem