Re: O_DIRECT in freebsd

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Sean Chittenden" <sean(at)chittenden(dot)org>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: O_DIRECT in freebsd
Date: 2003-06-17 14:17:55
Message-ID: 12480.1055859475@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-06-17 14:29:07 Re: [HACKERS] Our FLOAT(p) precision does not conform to spec
Previous Message Tom Lane 2003-06-17 14:11:41 Re: [HACKERS] CVS -Tip compile issue -- FreeBSD 4.8