Re: fsync alternatives (was: Re: [HACKERS] TODO item)

Поиск
Список
Период
Сортировка
От Chris Bitmead
Тема Re: fsync alternatives (was: Re: [HACKERS] TODO item)
Дата
Msg-id 389F5623.EB540669@nimrod.itg.telecom.com.au
обсуждение исходный текст
Ответ на Re: fsync alternatives (was: Re: [HACKERS] TODO item)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> 
> > > So, I think we are safe if we can either keep that file descriptor open
> > > until commit, or re-open it and fsync it on commit.  That assume a
> > > re-open is hitting the same file.  My opinion is that we should just
> > > fsync it on close and not worry about a reopen.
> >
> > I'm pretty sure that the standard is that a close on a file _should_
> > fsync it.
> 
> This is not true.  close flushes the user buffers to kernel buffers.  It
> does not force to physical disk in all cases, I think.  

fclose flushes user buffers to kernel buffers. close only frees the file
descriptor for re-use.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] TODO item
Следующее
От: Chris Bitmead
Дата:
Сообщение: Re: [HACKERS] ONLY