

> -----Original Message-----
> From: Tatsuo Ishii [mailto:t-ishii@sra.co.jp] 
> Sent: 06 March 2003 15:17
> To: Dave Page
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Win32 Powerfail testing
> 
> I'm sure FlushFileBuffers() is usesless for files opend with 
> open() too. 
> 
> As I said in the previlus mails, open()+_commit() does the 
> right job with the transaction log files. So probably I think 
> I should stick with open()+_commit() approach for ordinary 
> table/index files too.

Oh, I didn't see that message. So it's either:

open() + _commit()

Or

CreateFile() + FlushFileBuffers()

Magnus also mentioned using FILE_FLAG_NO_BUFFERING or
FILE_FLAG_WRITE_THROUGH with CreateFile(). I was concerned about the
additional complexity with FILE_FLAG_NO_BUFFERING, but
FILE_FLAG_WRITE_THROUGH sounds like it might do the job, if a little
sub-optimally. 

Is there really no way of allowing a decent write cache, but then being
able to guarantee a flush at the required time? Sounds a little cuckoo
to me but then it is Microsoft...

Anyhoo, it sounds like open() and _commit is this best choice as you
say.

Regards, Dave.

Thu, 6 Mar 2003 16:02:10 -0000
"Dave Page" <dpage@vale-housing.co.uk>
Re: Win32 Powerfail testing
> > As I said in the previlus mails, open()+_commit() does the 
> > right job with the transaction log files. So probably I think 
> > I should stick with open()+_commit() approach for ordinary 
> > table/index files too.
> 
> Oh, I didn't see that message. So it's either:
> 
> open() + _commit()

Sorry, I did not mention it explicitly. I meant we use the same
implementation as Jan's work. He uses open()+_commit(), I believe.
--
Tatsuo Ishii

Fri, 07 Mar 2003 10:33:20 +0900 (JST)
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: Win32 Powerfail testing