Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE34B447@algol.sollentuna.se
Whole thread Raw
List pgsql-hackers
> I have talked to Tom today and he is willing to implement the
> discussed method of doing fsync on every file modified
> between checkpoints, and add unlink handling for open files for Win32.

Great news. I'm sure this will benefig Unix platforms as well, when
taking into account the discussions previously.

<snip>

> 3)  On checkpoint request, either by the user or postmaster,
> the background writer will create a subprocess, do a sync(),
> wait, then do fsync of all files that were marked as dirty.
> The sync() should flush out most of the dirty files in an
> optimal manner.

Please make a config variable to make this sync() call optional. This
goes for Unix as well, and not just win32 (which doesn't support it).
Consider either a box with many different postgresql instances, or one
that run both postgresql and other software. Issuing sync() in that
sitaution will cause sync of a lot of data that probably doesn't need
syncing.
But it'd probably be a very good thing on a dedicated server, giving the
kernel the chance to optimise.


//Magnus

pgsql-hackers by date:

Previous
From: "Ramanujam H S Iyengar"
Date:
Subject: Re: How to get RelationName ??
Next
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink