Re: We really ought to do something about O_DIRECT and data=journalled on ext4

Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>

From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: Bruce Momjian <bruce@momjian.us>, Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-12-03T20:02:24Z
Lists: pgsql-hackers
On 03.12.2010 21:55, Josh Berkus wrote:
> All,
>
> So, I've been doing some reading about this issue, and I think
> regardless of what other changes we make we should never enable O_DIRECT
> automatically on Linux, and it was a mistake for us to do so in the
> first place.
>
> First, in the Linux docs for open():

The quote on that man page is hilarious:

"The thing that has always disturbed me about O_DIRECT  is  that
  the whole interface is just stupid, and was probably designed by
  a deranged monkey on some serious mind-controlling  substances."
               -- Linus

I agree we should not enable it by default. If it's faster on some 
circumstances, the admin is free to do the research and enable it, but 
defaults need to be safe above all.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com