Re: Sync vs. fsync during checkpoint

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Sync vs. fsync during checkpoint
Date: 2004-02-02 22:43:07
Message-ID: 87ptcxumpw.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:

> As some know, win32 doesn't have sync, and some are concerned that sync
> isn't reliable enough during checkpoint anyway.
>
> The trick is to somehow record all files modified since the last
> checkpoint, and open/fsync/close each one.

Note that some people believe that if you do this it doesn't guarantee that
any data written to other file descriptors referring to the same files would
also get synced.

I am not one of those people however. Both Solaris and NetBSD kernel hackers
have told me those OS's would work in such a scheme and furthermore that they
cannot imagine any sane VFS that would fail.

I definitely think it's better than calling sync(2) which doesn't guarantee
the blocks are written by any particular time at all..

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-02-02 23:01:48 patches
Previous Message Bruce Momjian 2004-02-02 22:40:27 Re: [PATCHES] log session end - again

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Jan Wieck 2004-02-03 01:05:44 Re: [HACKERS] What's left?
Previous Message Magnus Hagander 2004-02-02 22:36:51 Re: Win32 signals patch #2