Re: [HACKERS] Win32 and fsync()

2003-02-04 Thread Merlin Moncure
I think the fopen or _open family of functions all map directly to the win32 API. They add a little cruft, which generally makes using them pointless, because you have less control over security, caching, and other such things when opening the file. There is the slight overhead of the extra call,

Re: [HACKERS] Win32 and fsync()

2003-02-04 Thread Andrew Dunstan
- Original Message - From: "Gavin Sherry" <[EMAIL PROTECTED]> [snip] > > Where is the "other" flush besides FlushFileBuffers()? > > The only real code there is, it seems, an exclusive look on the file > descriptor. (Provided of course that that is what _lock_fh(filedes) does). > yes, it l

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Dann Corbit
> -Original Message- > From: Andrew Dunstan [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 03, 2003 3:31 PM > To: Dann Corbit; Merlin Moncure > Cc: [EMAIL PROTECTED] > Subject: Re: [HACKERS] Win32 and fsync() > > > I'm not sure what the provenance of

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Andrew Dunstan
t; <[EMAIL PROTECTED]>; "Andrew Dunstan" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 6:24 PM Subject: Re: [HACKERS] Win32 and fsync() > > -Original Message- > > From: Merlin Moncure [mailto:[EMAIL PROTECTED]] > >

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Gavin Sherry
On Mon, 3 Feb 2003, Dann Corbit wrote: > > -Original Message- > > From: Merlin Moncure [mailto:[EMAIL PROTECTED]] > > Sent: Monday, February 03, 2003 3:00 PM > > To: Andrew Dunstan > > Cc: [EMAIL PROTECTED] > > Subject: Re: [HACKERS] Win32 and fsync()

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Dann Corbit
> -Original Message- > From: Merlin Moncure [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 03, 2003 3:00 PM > To: Andrew Dunstan > Cc: [EMAIL PROTECTED] > Subject: Re: [HACKERS] Win32 and fsync() > > > >I'm having difficulty digging up the refer

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Gavin Sherry
On Mon, 3 Feb 2003, Andrew Dunstan wrote: > I'm also fairly sure I saw something like > #define fsync _commit > in the Berkeley DB sources the other day, which might be a clue. > > I'll be happy to be corrected, though. You'd be right: /* * Win32 has fsync, getcwd, snprintf and vsnprintf,

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Dave Page
> -Original Message- > From: Andrew Dunstan [mailto:[EMAIL PROTECTED]] > Sent: 03 February 2003 22:47 > To: PostgreSQL Hackers > Subject: Re: [HACKERS] Win32 and fsync() > > > I'm having difficulty digging up the reference, but I think I > recall see

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Merlin Moncure
>I'm having difficulty digging up the reference, but I think I recall seeing >something that said, roughly, on W32 there are 2 sets of buffers - those in >the user level library and those in the kernel level driver, and >FlushFileBuffers drains the first, while _commit drains both (it includes a >c

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Andrew Dunstan
PROTECTED]> To: "PostgreSQL Hackers" <[EMAIL PROTECTED]> Sent: Monday, February 03, 2003 3:15 PM Subject: [HACKERS] Win32 and fsync() > For Win32, in order to emulate fsync() we will need to call > FlushFileBuffers(): > http://msdn.microsoft.com/library/default.as

Re: [HACKERS] Win32 and fsync()

2003-02-03 Thread Merlin Moncure
>> For Win32, in order to emulate fsync() we will need to call >> FlushFileBuffers(): The supplied link does not work. FlushFileBuffers() is for flushing files opened with CreateFile() etc. For files opened with fopen(), call fflush(). For files opened with _open(), call _commit(). Likekly the

[HACKERS] Win32 and fsync()

2003-02-03 Thread Dann Corbit
For Win32, in order to emulate fsync() we will need to call FlushFileBuffers(): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/ base/flushfilebuffers.asp ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go t