Re: sync()

Поиск
Список
Период
Сортировка
От Kurt Roeckx
Тема Re: sync()
Дата
Msg-id 20030201165621.GA7198@ping.be
обсуждение исходный текст
Ответ на Re: sync()  (Kevin Brown <kevin@sysexperts.com>)
Ответы Re: sync()
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: On file locking
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PERFORM] not using index for select min(...)