Re: Direct I/O and postgresql version - Mailing list pgsql-general

From Greg Smith
Subject Re: Direct I/O and postgresql version
Date
Msg-id alpine.GSO.2.01.0905192029050.622@westnet.com
Whole thread Raw
In response to Direct I/O and postgresql version  ("Pal, Dipali (UMKC-Student)" <dp244@umkc.edu>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Scott Mead
Date:
Subject: Re: Configure fails to find readline libraries
Next
From: "Shakil Shaikh"
Date:
Subject: Re: Locking to restrict rowcounts.