Re: Direct I/O and postgresql version

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: "Pal, Dipali (UMKC-Student)" <dp244(at)umkc(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Direct I/O and postgresql version
Date: 2009-05-20 00:38:47
Message-ID: alpine.GSO.2.01.0905192029050.622@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2009-05-20 02:34:35 Re: Get block of N numbers from sequence
Previous Message Scott Mead 2009-05-19 23:38:25 Re: Configure fails to find readline libraries