Re: sync()

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: sync()
Date: 2003-02-01 16:15:17
Message-ID: 20030201161517.GN12957@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kurt Roeckx wrote:
> [SIO] [Option Start] If _POSIX_SYNCHRONIZED_IO is defined, the
> fsync() function shall force all currently queued I/O operations
> associated with the file indicated by file descriptor fildes to the
> synchronized I/O completion state. All I/O operations shall be
> completed as defined for synchronized I/O file integrity
> completion. [Option End]

Hmmm....so if I consistently want these semantics out of fsync() I
have to #define _POSIX_SYNCHRONIZED_IO? Or does the above mean that
you'll get those semantics if and only if the OS defines the above for
you?

I certainly hope the former is the case, because the newer semantics
which you mentioned in the section I cut don't do us any good at all
and we can't rely on the OS to define something like
_POSIX_SYNCHRONIZED_IO for us...

Being able to open a file, do an fsync(), and have the kernel actually
write all the buffers associated with that file to disk could be, I
think, a significant performance win compared with the "flush
everything known to the kernel" approach we take now, at least on
systems that do something other than PostgreSQL...

--
Kevin Brown kevin(at)sysexperts(dot)com

In response to

  • Re: sync() at 2003-01-31 21:11:47 from Kurt Roeckx

Responses

  • Re: sync() at 2003-02-01 16:56:21 from Kurt Roeckx

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-02-01 16:28:03 pg_dump is broken by recent privileges changes
Previous Message Andrew Dunstan 2003-02-01 14:00:10 Re: [mail] Re: Windows Build System