On 2016-01-25 16:47, Richard Hipp wrote: > On 1/25/16, Matthias-Christian Ott <ott at mirix.org> wrote: >> >> Does this mean that if I use SQLite SQLITE_EXTRA_DURABLE=0, PRAGMA >> journal_mode=DELETE and PRAGMA synchronous=FULL, SQLite could loose a >> transaction that it said to be committed depending on the VFS? > > Sort of. This appears to be true if you are running on QNX and you > lose power (or do a hard reset) shortly after the transaction commits. > It might be the case on other OSes/filesystems but it has never before > been observed. > > This is not new behavior. This is apparently what SQLite has been > doing for 15 years, across quadrillions of transactions on many > billions of devices, and it has never before caused any issues, until > just recently when Mr. Meinlschmidt upgraded to a newer version of > QNX.
So it would make sense to add a note that you should check whether your target VFS and target operating environment needs an fsync after a journal commit if you want to use this journal mode. Would it be possible to make SQLITE_EXTRA_DURABLE a pragma? Some GNU/Linux distributions package SQLite and therefore not every application can compile SQLite with different options. > Note especially that this is about durability, not consistency. > SQLite guarantees consistency regardless. People care about > consistency. Durability, not so much. I'm not a MySQL expert, but I > think the historical complaints about MyISAM had more to do with > consistency than with durability, did they not? That's also my understanding. It's unarguably an odd comparison but I was referring to the ACID properties in general. - Matthias-Christian