From: Greg Stark <gsstark@mit.edu>
To: pgsql-hackers@postgresql.org
Subject: Re: Sync vs. fsync during checkpoint
Date: 02 Feb 2004 17:43:07 -0500
Message-ID: <87ptcxumpw.fsf@stark.xeocode.com> (raw)
In-Reply-To: <200401301701.i0UH1bZ08600@candle.pha.pa.us>
References: <200401301701.i0UH1bZ08600@candle.pha.pa.us>
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
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: gsstark@mit.edu
Subject: Re: Sync vs. fsync during checkpoint
In-Reply-To: <87ptcxumpw.fsf@stark.xeocode.com>
* 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