Daniel Ng <danielng1...@gmail.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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers