Re: disk caching for writing log

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: disk caching for writing log
Дата
Msg-id 4CF92C31.104@enterprisedb.com
обсуждение исходный текст
Ответ на disk caching for writing log  (flyusa2010 fly <flyusa2010@gmail.com>)
Ответы Re: disk caching for writing log  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Список pgsql-hackers
On 03.12.2010 13:49, flyusa2010 fly wrote:
> When writing log, dbms should synchronously flush log to disk. I'm
> wondering, if it is possible that the logs are in disk cache, while the
> control is returned to dbms again, so dbms thinks logs are persistent on
> disk. In this case, if the disk fails, then there's incorrectness for dbms
> log writing, because the log is not persistent, but dbms considers it is
> persistent!

I have no idea what you mean. The method we use to flush the WAL to disk 
should not be fallible to such failures, we wait for fsync() or 
fdatasync() to return before we assume the logs are safely on disk. If 
you can elaborate what you mean by "control is returned to dbms", maybe 
someone can explain why in more detail.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: WIP patch for parallel pg_dump
Следующее
От: Stefan Kaltenbrunner
Дата:
Сообщение: Re: disk caching for writing log