* Mikheev, Vadim <[EMAIL PROTECTED]> [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 - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
- Re: [HACKERS] Allowing WAL fsync to be ... Alfred Perlstein
- Re: [HACKERS] Allowing WAL fsync t... Tom Lane
- Re: [HACKERS] Allowing WAL fsy... Alfred Perlstein
- Re: [HACKERS] Allowing WAL fsync to be done... Lamar Owen
- Re: [HACKERS] Allowing WAL fsync to be done via... Peter Eisentraut
- Re: [HACKERS] Allowing WAL fsync to be done... Tom Lane
- [HACKERS] Re: Allowing WAL fsync to be ... Thomas Lockhart
- Re: [HACKERS] Allowing WAL fsync to be done... Bruce Momjian
- Re: [HACKERS] Allowing WAL fsync to be done via O_S... Bruce Momjian
- RE: [HACKERS] Allowing WAL fsync to be done via O_SYNC Mikheev, Vadim
- Re: [HACKERS] Allowing WAL fsync to be done via O_S... Alfred Perlstein
- Re: [HACKERS] Allowing WAL fsync to be done via... Tom Lane
- Re: [HACKERS] Allowing WAL fsync to be done... Alfred Perlstein
- Re[2]: [HACKERS] Allowing WAL fsync to be d... Xu Yifeng
- Re: Re[2]: [HACKERS] Allowing WAL fsync... Alfred Perlstein
- Re[4]: [HACKERS] Allowing WAL fsyn... Xu Yifeng
- Re: Re[4]: [HACKERS] Allowing ... Alfred Perlstein
- Re: Re[4]: [HACKERS] Allowing ... Tom Lane
- Re: Re[4]: [HACKERS] Allowing ... Alfred Perlstein
- Re: Re[4]: [HACKERS] Allowing ... Tom Lane
- Re: Re[4]: [HACKERS] Allowing ... The Hermit Hacker