Re: Win32 Powerfail testing - Mailing list pgsql-hackers

From Dave Page
Subject Re: Win32 Powerfail testing
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B8259D28@mail.vale-housing.co.uk
Whole thread Raw
In response to Win32 Powerfail testing  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers

> -----Original Message-----
> From: Tatsuo Ishii [mailto:t-ishii@sra.co.jp]
> Sent: 07 March 2003 08:37
> To: Dave Page
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Win32 Powerfail testing
>
>
> >
> > Ah, but Jan/Katie's code *did not* survive the powerfails.
> Is there a
> > relatively easy way we can test open()/_commit against
> > CreateFile()/FlushFileBuffers() with the
> FILE_FLAG_WRITE_THROUGH flag
> > as suggested by Magnus (and indirectly by Merlin I guess)?
>
> There are two stages where a synchronized write is needed.
> One is WAL log writing. We confirmed that with open()/_commit
> this is ok.
>
> The other is checkpoint. Here we need to flush kernel buffers
> holding previous write to table/index files. To sync those
> files, PostgreSQL uses sync(). I guess Jan's implementatin
> did not survive in this case (mine neither).
>
> Today I revisited the implemnetation (replacing sync() with
> open/_commit) I made several days ago and found a bug with it
> (thanks to Hiroshi). With the fixed version of it, now my
> Win32 port has passed your test even right after checkpoint!.

Ahh, excellent news. Another step nearer to a good quality Windows port
:-)

Regards, Dave.


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Win32 Powerfail testing
Next
From: Kevin Brown
Date:
Subject: Re: Win32 Powerfail testing