Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint
Дата
Msg-id 20321.1076344003@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:
> The whole sync() vs. fsync() discussion is in my opinion nonsense at
> this point.

The sync vs fsync discussion is not about performance, it is about
correctness.  You can't simply dismiss the fact that we don't know
whether a checkpoint is really complete when we write the checkpoint
record.

I liked the idea put forward by (I think) Kevin Brown, that we issue
sync to start the I/O and then a bunch of fsyncs to wait for it to
finish.  If sync behaves per spec ("all the I/O is scheduled upon
return") then the fsyncs will not affect I/O ordering in the least.
But they will ensure that we don't proceed until the I/O is all done.

Also there is the Windows-port problem of not having sync available.
Doing the fsyncs only will provide an adequate, if possibly
lower-performing, solution there.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: psql variables
Следующее
От: markw@osdl.org
Дата:
Сообщение: Re: Proposed Query Planner TODO items