On 11/18/15, Howard Chu <hyc at symas.com> wrote: > Dan Kennedy wrote: >> >> As of yesterday, SQLite uses a read-only mapping in mmap mode. The db file >> is >> written using plain old write(), just as in non-mmap mode: > > That's the safest way to use mmap, but keep in mind that this requires a > unified buffer cache and systems like OpenBSD still don't have that, so this > approach will cause corruptions on systems like that.
Thanks for the warning, Howard. We independently discovered this back a few years ago and thus disable the mmap capability for OpenBSD and QNX. See https://www.sqlite.org/src/artifact/1b8c1b37f0?ln=742-748 for the code. Those are the only modern platforms that we know of that give problems. If you are aware of others, please let us know. -- D. Richard Hipp drh at sqlite.org