On 28 Dec 2017, at 8:10pm, Chris Brody <chris.br...@gmail.com> wrote:

> I am considering whether or not to recommend the WAL mode for users in the
> PhoneGap sqlite plugin that I maintain. The negative I see is the delays
> that may result at certain points from the need for database checkpoints.
> But I wondered if WAL may be more robust against possible sqlite
> corruption, in theory or in practice. Any comments?

WAL mode makes SQLite neither more nor less liable to corruption.  You should 
not be seeing corruption in SQLite no matter what mode it’s in.  If you want a 
PRAGMA to strengthen against corruption, try "PRAGMA synchronous = FULL":

<https://www.sqlite.org/pragma.html#pragma_synchronous>

If you are seeing corruption, you might want to see this checklist.

<https://www.sqlite.org/howtocorrupt.html>

Given that you’re running on a phone/tablet, emphasis is on handling suspension 
(backgrounding) and termination of the app properly.  There are people here 
experienced with using SQLite on iPhone and Android who can criticise your 
approach.

If nothing obvious occurs to you, please post some details: which platform, 
which circumstances, are you doing multi-thread or multi-process, do you check 
result codes for your API calls, are you getting error results ?

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

Reply via email to