From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Daniel Ng <danielng1985(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: to enable O_DIRECT within postgresql |
Date: | 2010-06-16 03:05:36 |
Message-ID: | 24785.1276657536@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Daniel Ng <danielng1985(at)gmail(dot)com> writes:
> I am trying to enable the direct IO for the disk-resident
> hash partitions of hashjoin in postgresql.
Why would you think that's a good idea?
> Can anyone advise what's the reason and how to fix this?
Per the open(2) man page:
The O_DIRECT flag may impose alignment restrictions on the length and
address of userspace buffers and the file offset of I/Os. In Linux
alignment restrictions vary by file system and kernel version and might
be absent entirely. However there is currently no file system-indepen-
dent interface for an application to discover these restrictions for a
given file or file system.
It's unlikely that the code you're hacking makes any attempt to align
the buffers it's using to read/write files.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Takahiro Itagaki | 2010-06-16 03:24:34 | Re: debug log in pg_archivecleanup |
Previous Message | David E. Wheeler | 2010-06-16 02:55:24 | Re: hstore ==> and deprecate => |