Re: Sync vs. fsync during checkpoint - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Sync vs. fsync during checkpoint
Date
Msg-id 87ptcxumpw.fsf@stark.xeocode.com
Whole thread Raw
In response to Sync vs. fsync during checkpoint  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] log session end - again
Next
From: Bruce Momjian
Date:
Subject: patches