>> Magnus prepared a trivial patch which added the O_SYNC flag 
>> for windows and mapped it to FILE_FLAG_WRITE_THROUGH in 
>> win32_open.c. 
>
>Attached is this trivial patch. As Merlin says, it needs some more
>reliability testing. But the numbers are at least reasonable - it
>*seems* like it's doing the right thing (as long as you turn off write
>cache). And it's certainly a significant performance increase - it
>brings the speed almost up to the same as linux.

For testing, I have built and uploaded binaries from the 8.0 stable
branch with this patch applied. They are available from
http://www.hagander.net/pgsql/. Install the 8.0.1 version first (from
MSI or manually, your choice), then replace postmaster.exe and
postgres.exe with the ones in the ZIP file. If you're running as a
service, make sure to stop the service first.

To make sure it uses the new code, change wal_sync_method to open_sync
in postgresql.conf and restart the service.

The kind of testing we need help is "pulling the plug reliability
testing". For this, make sure you have write caching turned off (it's no
the disks properties page in the Device Manager), run a bunch of
transactions on the db and then pull the plug of the machine in the
middle. It should come up with all acknowledged transactions still
applied, and all others not.


//Magnus

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to