Re: Allowing WAL fsync to be done via O_SYNC
От | Alfred Perlstein |
---|---|
Тема | Re: Allowing WAL fsync to be done via O_SYNC |
Дата | |
Msg-id | 20010315145100.E29888@fw.wintelcom.net обсуждение исходный текст |
Ответ на | RE: Allowing WAL fsync to be done via O_SYNC ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>) |
Ответы |
Re: Allowing WAL fsync to be done via O_SYNC
|
Список | pgsql-hackers |
* Mikheev, Vadim <vmikheev@SECTORBASE.COM> [010315 13:52] wrote: > > I believe that we don't know enough yet to nail down a hard-wired > > decision. Vadim's idea of preferring O_DSYNC if it appears to be > > different from O_SYNC is a good first cut, but I think we'd > > better make it possible to override that, at least for testing purposes. > > So let's leave fsync as default and add option to open log files > with O_DSYNC/O_SYNC. I have a weird and untested suggestion: How many files need to be fsync'd? If it's more than one, what might work is using mmap() to map the files in adjacent areas, then calling msync() on the entire range, this would allow you to batch fsync the data. The only problem is that I'm not sure: 1) how portable msync() is. 2) if msync garauntees metadata consistancy. Another benifit of mmap() is the 'zero' copy nature of it. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
В списке pgsql-hackers по дате отправления: