Re: Fwd: Apple Darwin disabled fsync?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Bierman <bierman(at)apple(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fwd: Apple Darwin disabled fsync?
Date: 2005-02-20 05:38:49
Message-ID: 11497.1108877929@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Bierman <bierman(at)apple(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-02-20 13:01:00 Re: Data loss, vacuum, transaction wrap-around
Previous Message Tom Lane 2005-02-20 05:30:17 Re: Data loss, vacuum, transaction wrap-around