On Sun, Jan 31, 2016 at 7:35 PM, Rowan Worth <rowanw at dugeo.com> wrote:
> On 31 January 2016 at 03:56, James K. Lowden <jklowden at schemamania.org> > wrote: > > > Surely SQLite does both -- fsync on file and directory -- as part of a > > commit. That's not in doubt, is it? > > > > No, SQLite does not. On COMMIT it fsyncs the database file and unlinks the > journal[1], but does not fsync the directory. This is demonstrated by the > logs in Stefan's initial post, and indeed the purpose of his patch was to > introduce an fsync on the directory after unlinking the journal. > Perhaps there could be a "paranoid" journal mode, where it first zeros out the header ala persist, then truncates the file, then deletes the file. -- Scott Robison