>I was thinking about sync() --- one of its problems is that is schedules
>to disk but returns before it is completed. If we do sync(), then open,
>fsync, close a file, aren't we then pretty sure all the scheduled sync
>have completed too? I know SCSI has tagged queueing, but I figured
>a new file and writing/fsync would come after the sync writes.
Sorry to jump in in the middle of this but I'm just wondering if some of the
Win32 file creation flags might help out here.. if the problem is figuring
out how to flush stuff to the disk, what about using FILE_FLAG_NO_BUFFERING?
I'm not sure how you'd create a stdio FILE with custom CreateFile flags but
there's probably a way, I can see if I can figure it out if it looks like it
would be useful.
There are quite a few flags that are Win32 specific but that might help for
various things, like..
FILE_FLAG_DELETE_ON_CLOSE (you can't delete a file while it's open, but you
can open it specifying that it go away when you close it, in the case where
you know it's a temp file).
FILE_ATTRIBUTE_TEMPORARY (an optimization that hints to the filesystem that
this is a temporary file so don't bother writing it to disk (keep it in the
cache) unless you need to).
FILE_FLAG_WRITE_THROUGH (kinda like FILE_FLAG_NO_BUFFERING but different..
the SDK docs describe how they interact).
In response to
pgsql-hackers by date
|Next:||From: Christopher Kings-Lynne||Date: 2003-11-20 01:17:29|
|Subject: Re: Is there going to be a port to Solaris 9 x86 in the|
|Previous:||From: Peter Eisentraut||Date: 2003-11-19 23:42:58|
|Subject: Re: Build farm|
pgsql-patches by date
|Next:||From: ViSolve Open Source Team||Date: 2003-11-20 00:55:26|
|Subject: (Modified) Patch request for PostgreSQL 7.4 for HP-UX IA-64|
|Previous:||From: Euler Taveira de Oliveira||Date: 2003-11-20 00:09:20|
|Subject: internationalization of initdb|
pgsql-hackers-win32 by date
|Next:||From: Claudio Natoli||Date: 2003-11-27 08:46:32|
|Subject: Re: fork/exec|
|Previous:||From: Manfred Spraul||Date: 2003-11-19 21:07:57|
|Subject: Re: [pgsql-hackers-win32] SRA Win32 sync() code|