Re: Use of sync() [was Re: Potential Large Performance Gain in WAL synching]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use of sync() [was Re: Potential Large Performance Gain in WAL synching]
Дата
Msg-id 3943.1033834057@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Use of sync() [was Re: Potential Large Performance Gain in WAL synching]  (Mats Lofkvist <mal@algonet.se>)
Список pgsql-hackers
Mats Lofkvist <mal@algonet.se> writes:
> [ mdsync is ugly and not completely reliable ]

Yup, it is.  Do you have a better solution?

fsync is not the answer, since the checkpoint process has no way to know
what files may have been touched since the last checkpoint ... and even
if it could find that out, a string of retail fsync calls would kill
performance, cf. Curtis Faith's complaint.

In practice I am not sure there is a problem.  The local man page for
sync() says
    The writing, although scheduled, is not necessarily complete upon    return from sync.

Now if "scheduled" means "will occur before any subsequently-commanded
write occurs" then we're fine.  I don't know if that's true though ...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] [GENERAL] CURRENT_TIMESTAMP
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Use of sync() [was Re: Potential Large Performance Gain in WAL synching]