Re: O_DIRECT support for Windows
От | Magnus Hagander |
---|---|
Тема | Re: O_DIRECT support for Windows |
Дата | |
Msg-id | 45ABC268.1080605@hagander.net обсуждение исходный текст |
Ответ на | Re: O_DIRECT support for Windows (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>) |
Список | pgsql-patches |
ITAGAKI Takahiro wrote: > Magnus Hagander <magnus@hagander.net> wrote: > >> FILE_FLAG_NO_BUFFERING requires that *all* I/O follows: >> * File access must begin at offsets that are integer multples of the >> volume sector size. >> * File access must be for number of bytes that are integer multiples of >> the volume sector size. >> * Buffer addresses for read and write operations must be sector aligned. >> >> I was under the impression that our code can in no way guarantee this. >> Especially given that a typical NTFS drive can have anything from 512 to >> 4096 bytes if you use the GUI to format it, and larger sizes than that >> when you use some SAN tools to do it. > > Do you mean there are drives that have larger sector size than 8kB? > We've already put the xlog buffer along the alignment of > ALIGNOF_XLOG_BUFFER (typically 8192 bytes). > But if there are such drives, using FILE_FLAG_NO_BUFFERING is harmful! Yes. I have heard this can happen with certain SAN drives. I haven't seen it myself, and I can't seem to find a reference right now :-) But I do recall having read about th need to check the sector size and specifically align it, because some do have that problem. //Magnus
В списке pgsql-patches по дате отправления: