Re: sync() - Mailing list pgsql-hackers

From Kurt Roeckx
Subject Re: sync()
Date
Msg-id 20030201165621.GA7198@ping.be
Whole thread Raw
In response to Re: sync()  (Kevin Brown <kevin@sysexperts.com>)
Responses Re: sync()
List pgsql-hackers
On Sat, Feb 01, 2003 at 08:15:17AM -0800, Kevin Brown wrote:
> 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?

It's something that will be defined in unistd.h.  Depending on
the value you know if the system supports it always, you can turn
it on per application, or it's always on.

You know that this standard is freely available on internet?
(http://www.unix-systems.org/version3/online.html)

There are other comments in about the usage of it.

Note that there also is a function call fdatasync() in the
Synchronized IO extention.


Kurt



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: On file locking
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] not using index for select min(...)