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