pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jan Wieck <JanWieck@Yahoo.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA@spardat.at>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32@postgresql.org>
Subject: Re: [HACKERS] Sync vs. fsync during checkpoint
Date: Mon, 09 Feb 2004 11:26:43 -0500
Message-ID: <20321.1076344003@sss.pgh.pa.us> (raw)
In-Reply-To: <40279A25.6020600@Yahoo.com>
References: <200402080144.i181ija15739@candle.pha.pa.us>
	<40279A25.6020600@Yahoo.com>

Jan Wieck <JanWieck@Yahoo.com> writes:
> The whole sync() vs. fsync() discussion is in my opinion nonsense at 
> this point.

The sync vs fsync discussion is not about performance, it is about
correctness.  You can't simply dismiss the fact that we don't know
whether a checkpoint is really complete when we write the checkpoint
record.

I liked the idea put forward by (I think) Kevin Brown, that we issue
sync to start the I/O and then a bunch of fsyncs to wait for it to
finish.  If sync behaves per spec ("all the I/O is scheduled upon
return") then the fsyncs will not affect I/O ordering in the least.
But they will ensure that we don't proceed until the I/O is all done.

Also there is the Windows-port problem of not having sync available.
Doing the fsyncs only will provide an adequate, if possibly
lower-performing, solution there.

			regards, tom lane



view thread (31+ messages)  latest in thread

Message-ID: <20321.1076344003@sss.pgh.pa.us>
Permalink:  ../20321.1076344003@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20321.1076344003@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, JanWieck@Yahoo.com, pgman@candle.pha.pa.us, ZeugswetterA@spardat.at, pgsql-hackers-win32@postgresql.org
  Subject: Re: [HACKERS] Sync vs. fsync during checkpoint
  In-Reply-To: <20321.1076344003@sss.pgh.pa.us>
  References: <200402080144.i181ija15739@candle.pha.pa.us> <40279A25.6020600@Yahoo.com> <20321.1076344003@sss.pgh.pa.us>

* 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