Re: [PATCHES] [pgsql-patches] O_DIRECT support for Windows

2007-04-13 Thread Magnus Hagander
I've done some further looking aruond at this, and I've been unable to find any references to disk systems with sector size 8192 bytes (which is what the alignment of the buffers per XLOG_BLCKSZ, at leastby default). So I'll commit this fairly simple patch, and we'll revert it or add runtime

Re: [PATCHES] [pgsql-patches] O_DIRECT support for Windows

2007-04-13 Thread Bruce Momjian
Patch applied by Magnus. --- ITAGAKI Takahiro wrote: The attached is a patch to define O_DIRECT by ourselves on Windows, and to map O_DIRECT to FILE_FLAG_NO_BUFFERING. There will be a consistency in our support between

Re: [PATCHES] [pgsql-patches] O_DIRECT support for Windows

2007-04-02 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. ---

Re: [PATCHES] [pgsql-patches] O_DIRECT support for Windows

2007-03-27 Thread Magnus Hagander
IIRC, we're still waiting for performance numbers showing there exists a win from this patch. //Magnus Bruce Momjian wrote: Magnus, where are on this? --- Magnus Hagander wrote: We're ok with the alignment issues

Re: [PATCHES] [pgsql-patches] O_DIRECT support for Windows

2007-02-20 Thread Bruce Momjian
Are there any performance numbers on this? --- ITAGAKI Takahiro wrote: The attached is a patch to define O_DIRECT by ourselves on Windows, and to map O_DIRECT to FILE_FLAG_NO_BUFFERING. There will be a consistency in

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-20 Thread Magnus Hagander
We're ok with the alignment issues provided the is code added to reject O_DIRECT if the sector size is too large. We also said we need to see some performance numbers on the effect of the patch before it goes in. //Magnus Bruce Momjian wrote: So, do we want this patch? Are we OK on WIN32

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-19 Thread Bruce Momjian
So, do we want this patch? Are we OK on WIN32 alignment issues? --- ITAGAKI Takahiro wrote: The attached is a patch to define O_DIRECT by ourselves on Windows, and to map O_DIRECT to FILE_FLAG_NO_BUFFERING. There will

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-17 Thread Magnus Hagander
People seem to be confusing sector size and cluster size. Microsoft Windows assumes sectors are 8k or less on hard drives (99% are 512 bytes). Do you have any doc ref for this? I beleive you but I've been searching for docs on that and found nothing. Cluster size is the allocation unit.

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-17 Thread Magnus Hagander
I think many people can benefit from Itagaki-san's proposal, and NO_BUFFERING should be default. Isn't it very rare that disks with sector size larger than 8KB are used? Definitly very rare. Providing a way (such as wal_sync_method) to avoid NO_BUFFERING is sufficient for people

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-17 Thread Chuck McDevitt
PM To: Takayuki Tsunakawa; Magnus Hagander Cc: ITAGAKI Takahiro; pgsql-patches@postgresql.org Subject: Re: [pgsql-patches] O_DIRECT support for Windows People seem to be confusing sector size and cluster size. Microsoft Windows assumes sectors are 8k or less on hard drives (99% are 512 bytes

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-16 Thread Magnus Hagander
On Tue, Jan 16, 2007 at 10:59:11AM +0900, Takayuki Tsunakawa wrote: From: Magnus Hagander [EMAIL PROTECTED] ITAGAKI Takahiro wrote: 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

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-16 Thread Takayuki Tsunakawa
Hello, Magnus-san, Itagaki-san From: Magnus Hagander [EMAIL PROTECTED] I think many people can benefit from Itagaki-san's proposal, and NO_BUFFERING should be default. Isn't it very rare that disks with sector size larger than 8KB are used? Definitly very rare. Providing a way (such as

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-16 Thread Chuck McDevitt
Of Takayuki Tsunakawa Sent: Tuesday, January 16, 2007 4:53 PM To: Magnus Hagander Cc: ITAGAKI Takahiro; pgsql-patches@postgresql.org Subject: Re: [pgsql-patches] O_DIRECT support for Windows Hello, Magnus-san, Itagaki-san From: Magnus Hagander [EMAIL PROTECTED] I think many people can benefit from

[pgsql-patches] O_DIRECT support for Windows

2007-01-15 Thread ITAGAKI Takahiro
The attached is a patch to define O_DIRECT by ourselves on Windows, and to map O_DIRECT to FILE_FLAG_NO_BUFFERING. There will be a consistency in our support between Windows and other OSes that have O_DIRECT. Also, there is the following comment that says, I read, we should do so. | handle other

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-15 Thread Magnus Hagander
On Mon, Jan 15, 2007 at 05:36:09PM +0900, ITAGAKI Takahiro wrote: The attached is a patch to define O_DIRECT by ourselves on Windows, and to map O_DIRECT to FILE_FLAG_NO_BUFFERING. There will be a consistency in our support between Windows and other OSes that have O_DIRECT. Also, there is

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-15 Thread ITAGAKI Takahiro
Magnus Hagander [EMAIL PROTECTED] 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. *

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-15 Thread Magnus Hagander
ITAGAKI Takahiro wrote: Magnus Hagander [EMAIL PROTECTED] 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

Re: [pgsql-patches] O_DIRECT support for Windows

2007-01-15 Thread Takayuki Tsunakawa
From: Magnus Hagander [EMAIL PROTECTED] ITAGAKI Takahiro wrote: 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