Re: wal_synch_method = open_sync safe on RHEL 5.5? - Mailing list pgsql-performance

From Greg Smith
Subject Re: wal_synch_method = open_sync safe on RHEL 5.5?
Date
Msg-id 4C1B0C11.1010204@2ndquadrant.com
Whole thread Raw
In response to Re: wal_synch_method = open_sync safe on RHEL 5.5?  (Mark Mielke <mark@mark.mielke.cc>)
List 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@2ndQuadrant.com   www.2ndQuadrant.us


pgsql-performance by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: wal_synch_method = open_sync safe on RHEL 5.5?
Next
From: Matthew Wakeling
Date:
Subject: Re: PostgreSQL as a local in-memory cache