Re: wal_synch_method = open_sync safe on RHEL 5.5?

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
Cc: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, pgsql-performance(at)postgresql(dot)org
Subject: Re: wal_synch_method = open_sync safe on RHEL 5.5?
Date: 2010-06-18 06:02:57
Message-ID: 4C1B0C11.1010204@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark Mielke wrote:
> The conclusion I read was that Linux O_SYNC behaves like O_DSYNC on
> other systems. For WAL, this seems satisfactory?

It would be if it didn't have any bugs or limitiations, but it does.
The one pointed out in the message I linked to suggests that a mix of
buffered and O_SYNC direct I/O can cause a write error, with the exact
behavior you get depending on the kernel version. That's a path better
not explored as I see it.

The kernels that have made some effort to implement this correctly
actually expose O_DSYNC, on newer Linux systems. My current opinion is
that if you only have Linux O_SYNC, don't use it. The ones with O_DSYNC
haven't been around for long enough to be proven or disproven as
effective yet.

--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Matthew Wakeling 2010-06-18 09:15:06 Re: PostgreSQL as a local in-memory cache
Previous Message Mark Kirkwood 2010-06-18 04:19:52 Re: wal_synch_method = open_sync safe on RHEL 5.5?