Re: [HACKERS] fsync -> fdatasync in backend/storage/file/fd.c

Поиск
Список
Период
Сортировка
От ocie@paracel.com
Тема Re: [HACKERS] fsync -> fdatasync in backend/storage/file/fd.c
Дата
Msg-id 9804170227.AA27585@dolomite.paracel.com
обсуждение исходный текст
Ответ на Re: [HACKERS] fsync -> fdatasync in backend/storage/file/fd.c  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
The Hermit Hacker wrote:
>
> On Fri, 17 Apr 1998, Michal Mosiewicz wrote:
>
> > I don't remember if it has been mentioned.
> >
> > Anyhow, I think that it would be nice to change fsync'es into
> > fdatasync'es (of course as an autoconf-igurable option). I don't think
> > it's necessary to update all file's metadata each time a file is
> > flushed.
> >
> > I dunno where it's implemented. But it's for sure implemented in Linux.
>
>     We don't have it (FreeBSD)...what does it do? *raised eyebrow*
> And, how many ppl actually have fsync's enabled?

It's a POSIX thing.  fsync will sync the data and the metadata, but
fdatasync only syncs the data.  So in the case of a crash, the inode
might not have the right date, etc.  This can speed things up, but I
wouldn't venture a guess as to how much.

Ocie

В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] fsync -> fdatasync in backend/storage/file/fd.c
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [INTERFACES] Re: ODBC driver