On 10 Sep 2012, at 9:00pm, Keith Chew <keith.c...@gmail.com> wrote:

> Using journal_mode=WAL and synchronous=2, it is my understanding (from
> the docs and my own power loss testing) that sqlite will maintain
> durability on a power loss.
> 
> My question is, if sqlite can guarantee durability with synchronous=2,
> why can't it (from reading the docs and other posts) do that with
> synchronous=1?

Probably worth us knowing whether you've read the 'Performance Considerations' 
section of

<http://www.sqlite.org/wal.html>

before anyone gives an in-depth answer.  The basic difference between the two 
settings is that FULL (2) synchronises far more frequently than NORMAL (1), 
meaning that in the even of power loss, fewer transactions will be lost.  
Though if your OS and hardware does perform as documented then neither mode 
will actually lose data or cause database corruption.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to