Re: sync()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sync()
Дата
Msg-id 1610.1042008162@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: sync()  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> Can someone tell me why we need sync() here?

> ?? I thought WAL files are synced by pg_fsync() (if needed).

They are.  But to write a checkpoint record --- which implies that the
WAL records before it need no longer be replayed --- we have to ensure
that all the changes-so-far in the regular database files are written
down to disk.  That is what we need sync() for.
        regards, tom lane


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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: sync()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: sync()