Re: [pgsql-hackers-win32] SRA Win32 sync() code

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] SRA Win32 sync() code
Date: 2003-11-19 21:07:57
Message-ID: 3FBBDBAD.8050903@colorfullife.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Shridhar Daithankar wrote:

>Does 30% difference above count as significant?
>
>
No. It's Linux, we can look at the sources: there is no per-fd cache,
the page cache is global. Thus fsync() syncs the whole cache to disk.
A problem could only occur if the file cache is not global - perhaps a
per-node file cache on NUMA systems - IRIX on an Origin 2000 cluster or
something similar.

But as I read the unix spec, fsync is guaranteed to sync all data to disk:
Draft 6 of the posix-200x spec:
SIO If _POSIX_SYNCHRONIZED_IO is defined, the fsync( ) function shall
force all currently queued I/O operations associated with the file
indicated by file descriptor fildes to the synchronized I/O completion
state. All I/O operations shall be completed as defined for synchronized
I/O file integrity completion.

"All I/O operations associated with the file", not all operations
associated with the file descriptor.

--
Manfred

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2003-11-19 22:02:51 Re: Commercial binary support?
Previous Message Robert Treat 2003-11-19 21:00:46 Re: Is there going to be a port to Solaris 9 x86 in the

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Steve Tibbett 2003-11-20 00:35:03 Re: [PATCHES] SRA Win32 sync() code
Previous Message Kurt Roeckx 2003-11-19 20:07:34 Re: [PATCHES] SRA Win32 sync() code

Browse pgsql-patches by date

  From Date Subject
Next Message Philip Yarra 2003-11-19 22:48:12 Fwd: quick ECPG doco change
Previous Message Kurt Roeckx 2003-11-19 20:07:34 Re: [PATCHES] SRA Win32 sync() code