On Tue, 19 May 2009, Pal, Dipali (UMKC-Student) wrote:
> Which of the recent versions of postgresql support direct I/O?
As of 8.1 PostgreSQL does direct I/O for writes to the WAL if you've
configured wal_sync_method={open_datasync,open_sync} on supported
platforms. I know Linux works but Solaris doesn't. See
http://www.postgresql.org/docs/current/static/runtime-config-wal.html#GUC-WAL-SYNC-METHOD
and http://www.postgresql.org/docs/current/static/wal-configuration.html
for more details. The usual workaround for the Solaris problem is to
split the WAL pg_xlog directory onto another filesystem and change its
mounting options, see
http://blogs.sun.com/jkshah/entry/postgresql_wal_sync_method_and for more
about that.
There is no option to do direct writes for the main database I/O because
the database usually performs better if you rely on the filesystem cache.
You can certainly find situations where sync writes end up working out
better, but they're not common.
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD