Hi Simo, > The msync manpage reports that msync *must* be called before > munmap. Failure to do so may result in lost data. Fix an ifdef > check, I really think we meant to check HAVE_MMAP here.
Please revert this change immediately. That change would slow down tdb by a couple of orders or magnitude for our temporary databases. The msync map page if referring to losing data if the machine crashes before the data is flushed. If we want safety against that we should use tdb transactions, which do all the right calls (and no, just doing a msync like that is NOT enough). and please check with somebody who knows systems programming before making a change like this. Cheers, Tridge