Re: Fwd: Is the fsync() fake on FreeBSD6.1?

From: AgentM <agentm(at)themactionfaction(dot)com>
To: PostgreSQL-development hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Is the fsync() fake on FreeBSD6.1?
Date: 2006-09-22 19:15:09
Message-ID: 11E1CA24-F602-46B6-B623-F3A33AC41A5C@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Sep 22, 2006, at 15:00 , mark(at)mark(dot)mielke(dot)cc wrote:

> On Fri, Sep 22, 2006 at 01:52:02PM -0400, Jim Nasby wrote:
>> I thought folks might be interested in this... note in particular the
>> comment about linux.
> ...
>>> From: Greg 'groggy' Lehey <grog(at)FreeBSD(dot)org>
>>> Date: June 26, 2006 11:34:12 PM EDT
>>> To: leo huang <leo(dot)huang(dot)list(at)gmail(dot)com>
>>> Cc: freebsd-performance(at)freebsd(dot)org
>>> Subject: Re: Is the fsync() fake on FreeBSD6.1?
>>> ...
>>> My understanding from the last time I looked at the code was that
>>> fsync does the right thing:
>>>
>>> The fsync() system call causes all modified data and
>>> attributes of fd to
>>> be moved to a permanent storage device. This normally results
>>> in all in-
>>> core modified copies of buffers for the associated file to be
>>> written to
>>> a disk.

This is probably the same issue that the hackers encountered on
Darwin- namely fsync() flushes the kernel cache, but a further
function call was needed to flush the hard drive buffers. This meets
the standard's definition of fsync because the data is indeed moved
to the device, but it happens to just be the device's buffer instead
of non-volatile storage.

-M

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-09-22 19:18:50 Re: initdb ignores invalid locale names
Previous Message Tom Lane 2006-09-22 19:11:09 Re: Fwd: Is the fsync() fake on FreeBSD6.1?