Re: O_DIRECT for WAL writes - Mailing list pgsql-patches

From Tom Lane
Subject Re: O_DIRECT for WAL writes
Date
Msg-id 6455.1117435929@sss.pgh.pa.us
Whole thread Raw
In response to Re: O_DIRECT for WAL writes  (Neil Conway <neilc@samurai.com>)
Responses Re: O_DIRECT for WAL writes
Re: O_DIRECT for WAL writes
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> I wonder if we're benchmarking the right thing, though: is
> opening a file with O_DIRECT sufficient to ensure that a write(2) does
> not return until the data has hit disk?

Some googling suggests so, eg
http://www.die.net/doc/linux/man/man2/open.2.html

There are several useful tidbits about O_DIRECT on that page,
including this quote:

> "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

Somehow I find that less than confidence-building...

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: O_DIRECT for WAL writes
Next
From: Neil Conway
Date:
Subject: Re: O_DIRECT for WAL writes