Re: [pgsql-patches] O_DIRECT support for Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [pgsql-patches] O_DIRECT support for Windows
Date: 2007-04-13 10:27:33
Message-ID: 20070413102733.GM31884@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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
checks later if we find out that there exist such systems somewhere..

//Magnus

On Mon, Apr 02, 2007 at 04:39:00PM -0400, Bruce Momjian wrote:
>
> 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.
>
> ---------------------------------------------------------------------------
>
>
> 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 the following comment that says, I read,
> > we should do so.
> > | handle other flags? (eg FILE_FLAG_NO_BUFFERING/FILE_FLAG_WRITE_THROUGH)
> >
> > Is this worth doing? Do we need more performance reports for the change?
> >
> > Regards,
> > ---
> > ITAGAKI Takahiro
> > NTT Open Source Software Center
>
> [ Attachment, skipping... ]
>
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: Don't 'kill -9' the postmaster
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://www.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dany DeBontridder 2007-04-13 12:28:16 where to write small reusable functions ?
Previous Message Zeugswetter Andreas ADI SD 2007-04-13 09:21:34 Re: [HACKERS] Full page writes improvement, code update

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-04-13 13:27:56 Re: Reviewers Guide to DeferredTransactions/TransactionGuarantee
Previous Message Zeugswetter Andreas ADI SD 2007-04-13 09:21:34 Re: [HACKERS] Full page writes improvement, code update