Re: O_DIRECT in freebsd

Поиск
Список
Период
Сортировка
От Manfred Spraul
Тема Re: O_DIRECT in freebsd
Дата
Msg-id 3F9FFCB4.1020103@colorfullife.com
обсуждение исходный текст
Ответ на Re: O_DIRECT in freebsd  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: O_DIRECT in freebsd  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Tom Lane wrote:

> Not for WAL --- we never read the WAL at all in normal operation. (If
>
>it works for writes, then we would want to use it for writing WAL, but
>that's not apparent from what Christopher quoted.)
>
At least under Linux, it works for writes. Oracle uses O_DIRECT to 
access (both read and write) disks that are shared between multiple 
nodes in a cluster - their database kernel must know when the data is 
visible to the other nodes.
One problem for WAL is that O_DIRECT would disable the write cache - 
each operation would block until the data arrived on disk, and that 
might block other backends that try to access WALWriteLock.
Perhaps a dedicated backend that does the writeback could fix that.

Has anyone tried to use posix_fadvise for the wal logs?
http://www.opengroup.org/onlinepubs/007904975/functions/posix_fadvise.html

Linux supports posix_fadvise, it seems to be part of xopen2k.

--   Manfred



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: O_DIRECT in freebsd
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 7.4 compatibility question