Re: [pgsql-hackers-win32] SRA Win32 sync() code
| От | Manfred Spraul |
|---|---|
| Тема | Re: [pgsql-hackers-win32] SRA Win32 sync() code |
| Дата | |
| Msg-id | 3FBBDBAD.8050903@colorfullife.com обсуждение исходный текст |
| Ответ на | Re: [pgsql-hackers-win32] SRA Win32 sync() code (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>) |
| Список | 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
В списке pgsql-patches по дате отправления: