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