to enable O_DIRECT within postgresql
От | Daniel Ng |
---|---|
Тема | to enable O_DIRECT within postgresql |
Дата | |
Msg-id | AANLkTinOYAKY-g0l3aIvofjgM_TlHiUpzTx4eqwwCfzi@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: to enable O_DIRECT within postgresql
Re: to enable O_DIRECT within postgresql |
Список | 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 по дате отправления: