| От | Tom Lane |
|---|---|
| Тема | Re: sync() |
| Дата | |
| Msg-id | 1537.1042007689@sss.pgh.pa.us обсуждение |
| Ответ на | Re: sync() (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Ответы |
Re: sync()
|
| Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tatsuo Ishii wrote:
>> Can someone tell me why we need sync() here?
> As part of checkpoint, we discard some WAL files. To do that, we must
> first be sure that all the dirty buffers we have written to the kernel
> are actually on the disk. That is why the sync() is required.
What we really need is something better than sync(), viz flush all dirty
buffers to disk *and* wait till they're written. But sync() and sleep
for awhile is the closest portable approximation.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера