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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint
Дата
Msg-id 8526.1076862413@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint  (Florian Weimer <fw@deneb.enyo.de>)
Ответы Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Florian Weimer <fw@deneb.enyo.de> writes:
> Tom Lane wrote:
>> You can only fsync one FD at a time (too bad ... if there were a
>> multi-file-fsync API it'd solve the overspecified-write-ordering issue).

> What about aio_fsync()?

(1) it's unportable; (2) it's not clear that it's any improvement over
fsync().  The Single Unix Spec says aio_fsync "returns when the
synchronisation request has been initiated or queued to the file or
device".  Depending on how the implementation works, this may mean that
all the dirty blocks have been scheduled for I/O and will be written
ahead of subsequently scheduled blocks --- if so, the results are not
really different from fsync()'ing the files in the same order.

The best idea I've heard so far is the one about sync() followed by
a bunch of fsync()s.  That seems to be correct, efficient, and dependent
only on very-long-established Unix semantics.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] dollar quoting
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: [SQL] 7.4 - FK constraint performance