Re: Sync vs. fsync during checkpoint

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Sync vs. fsync during checkpoint
Дата
Msg-id 87ptcxumpw.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Sync vs. fsync during checkpoint  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:

> As some know, win32 doesn't have sync, and some are concerned that sync
> isn't reliable enough during checkpoint anyway.
> 
> The trick is to somehow record all files modified since the last
> checkpoint, and open/fsync/close each one.

Note that some people believe that if you do this it doesn't guarantee that
any data written to other file descriptors referring to the same files would
also get synced.

I am not one of those people however. Both Solaris and NetBSD kernel hackers
have told me those OS's would work in such a scheme and furthermore that they
cannot imagine any sane VFS that would fail.

I definitely think it's better than calling sync(2) which doesn't guarantee
the blocks are written by any particular time at all..

-- 
greg



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] log session end - again
Следующее
От: Bruce Momjian
Дата:
Сообщение: patches