pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: fsync or fdatasync
Date: Tue, 10 Sep 2002 19:28:18 +0200
Message-ID: <20020910192818.A24188@vestdata.no> (raw)
In-Reply-To: <200209101717.g8AHHuV29296@candle.pha.pa.us>
References: <20020910180957.Y24188@vestdata.no>
	<200209101717.g8AHHuV29296@candle.pha.pa.us>

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



view thread (26+ messages)  latest in thread

Message-ID: <20020910192818.A24188@vestdata.no>
Permalink:  ../20020910192818.A24188@vestdata.no/
Also on:    postgresql.org/message-id/20020910192818.A24188@vestdata.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: postgres@ragnark.vestdata.no, pgman@candle.pha.pa.us, mendola@bigfoot.com
  Subject: Re: fsync or fdatasync
  In-Reply-To: <20020910192818.A24188@vestdata.no>
  References: <20020910180957.Y24188@vestdata.no> <200209101717.g8AHHuV29296@candle.pha.pa.us> <20020910192818.A24188@vestdata.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox