On 3/11/15, Mario M. Westphal <mw at mwlabs.de> wrote: > > Is there a higher risk in using WAL and/or shared_cache? In a mulit-threaded > environment? >
No. WAL should be "safer" than rollback as it is less prone to problems due to malfunctioning FlushFileBuffers() system calls. Multithreading should not be a problem. > > > Is it safe to switch existing databases back from WAL to non-wall mode? Is > there a specific workflow? Simply run "PRAGMA journal_mode=DELETE;" But you have to do that when only a single database connection has the database open, or else it will refuse. > > > > SQLite was always so reliable and I had maybe one report about a damaged > database in 3 months (and usually it was a hard defect or a power failure). > But now I get reports about damaged databases every week, sometimes even for > new databases which have been created an hour ago. > > > > I fear that by using WAL/shared_cache with multiple SQLIte instances in > multiple threads I somehow stress out SQLite, causing database damage under > some conditions. It should just work. It should not be possible to "stress out" SQLite. We also would like to understand what is going on. What version of SQLite are you using? And what compiler are you using? -- D. Richard Hipp drh at sqlite.org