On 6/13/16, Simon Slavin <slav...@bigfraud.org> wrote: > > The relevance to this list is mostly in the last item above: atomic > safe-save primitives.
The documentation indicates that safe-save only does file rename operations atomically. This of no help in making SQLite transactions atomic. SQLite cannot use file renaming because SQLite databases are used concurrently by multiple processes, and so if one process moves the file, it would move the file out from under other processes. The safe-save feature appears to be an effort to aid grow-your-own style atomicity that is commonly implemented by writing new content into a new file, then renaming the new file over top of the old. This comes up a lot for applications that treat the filesystem as a key/value database. Many programmers have assumed that rename is atomic on unix. It is not. The rename-is-atomic assumption is so wide-spread in the Linux world, that the linux kernel was modified to make renames closer to being atomic on common filesystems such as EXT4. I think this new feature of HFS+ is likely a similar effort. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users