Re: O_DIRECT in freebsd - Mailing list pgsql-hackers

From Tom Lane
Subject Re: O_DIRECT in freebsd
Date
Msg-id 12480.1055859475@sss.pgh.pa.us
Whole thread Raw
In response to Re: O_DIRECT in freebsd  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: O_DIRECT in freebsd  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> The reason I mention it is that Postgres already supports O_DIRECT I think
> on some other platforms (for whatever reason).

[ sounds of grepping... ]  No.  The only occurrence of O_DIRECT in the
source tree is in TODO:

* Consider use of open/fcntl(O_DIRECT) to minimize OS caching

I personally disagree with this TODO item for the same reason Sean
cited: Postgres is designed and tuned to rely on OS-level disk caching,
and bypassing that cache is far more likely to hurt our performance than
help it.

However, if someone wants to do some experimentation with O_DIRECT, I'd
be as interested as anyone to find out what happens...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_get_triggerdef in pg_dump
Next
From: Tom Lane
Date:
Subject: Re: Our FLOAT(p) precision does not conform to spec