to enable O_DIRECT within postgresql - Mailing list pgsql-hackers

From Daniel Ng
Subject to enable O_DIRECT within postgresql
Date
Msg-id AANLkTinOYAKY-g0l3aIvofjgM_TlHiUpzTx4eqwwCfzi@mail.gmail.com
Whole thread Raw
Responses Re: to enable O_DIRECT within postgresql
Re: to enable O_DIRECT within postgresql
List pgsql-hackers
Dear all,<br />       I am trying to enable the direct IO for the disk-resident <br />hash partitions of hashjoin in
postgresql.The basic postgres <br />environment settings are:<br />       centos 5.5<br />       kernel 2.6.18<br />  
    ext3 fs<br />       PostgreSQL 8.4.3 <br /><br />       Previously I added the O_DIRECT flag to the "fileFlags" <br
/>parameterof open() within BasicOpenFile() (line 505 in <br />src/backend/storage/file/fd.c), but strangely I cannot
even<br /> start the server, with error:<br /><br />PANIC:  could not read from control file: Invalid argument<br
/>Aborted<br/><br />       So far what I did is to add the O_DIRECT flag to the <br />"fileFlags" parameter of
PathNameOpenFile()(line 992 & 1007 in <br /> src/backend/storage/file/fd.c), which calls the BasicOpenFIle()<br
/>andpasses the "fileFlags". This time, I can start the sever,<br />but when I submit a hashjoin query from the client,
ithappens<br /><br /> ERROR:  could not write to hash-join temporary file: Invalid argument<br /><br />Can anyone
advisewhat's the reason and how to fix this?<br />Or what's the correct way to enable the direct disk IO within<br
/>postgres?I appreciate the suggestions and thanks very much!<br /><br />Regards<br />Daniel  

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposal for 9.1: WAL streaming from WAL buffers
Next
From: "David E. Wheeler"
Date:
Subject: Re: hstore ==> and deprecate =>