Re: Fwd: Apple Darwin disabled fsync? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fwd: Apple Darwin disabled fsync?
Date
Msg-id 11497.1108877929@sss.pgh.pa.us
Whole thread Raw
In response to Fwd: Apple Darwin disabled fsync?  (Peter Bierman <bierman@apple.com>)
Responses Re: Fwd: Apple Darwin disabled fsync?
List pgsql-hackers
Peter Bierman <bierman@apple.com> writes:
>> I believe that what the above comment refers to is the fact that
>> fsync() is not sufficient to guarantee that your data is on stable
>> storage and on MacOS X we provide a fcntl(), called F_FULLFSYNC,
>> to ask the drive to flush all buffered data to stable storage.

I've been looking for documentation on this without a lot of luck
("man fcntl" on OS X 10.3.8 has certainly never heard of it).
It's not completely clear whether this subsumes fsync() or whether
you're supposed to fsync() and then use the fcntl.

Also, isn't it fundamentally at the wrong level?  One would suppose that
the drive flush operation is going to affect everything the drive
currently has queued, not just the one file.  That makes it difficult
if not impossible to use efficiently.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Data loss, vacuum, transaction wrap-around
Next
From: Bruno Wolff III
Date:
Subject: Re: Data loss, vacuum, transaction wrap-around