This patch ticks off the following TODO items: Consider use of open/fcntl(O_DIRECT) to minimize OS caching, especially for WAL writes.
The patch adds a new choice "open_direct" to wal_sync_method. It uses O_DIRECT flags for WAL writes, like O_SYNC. I had sent a patch looked like this before (http://candle.pha.pa.us/mhonarc/patches2/msg00131.html) but I found it is not always needed to write multiple pages in one write() because most disks have writeback-cache. So, I left only O_DIRECT routines in the patch and it impacts a present source code less. --- ITAGAKI Takahiro NTT Cyber Space Laboratories
xlog.diff
Description: Binary data
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org