On 29 Nov 2012, at 5:18pm, Richard Hipp <[email protected]> wrote:

> On Thu, Nov 29, 2012 at 12:04 PM, Simon Slavin <[email protected]> wrote:
> 
>> Should these journal files exist even when nothing is open or has crashed
>> ?  I thought that properly-closed connections deleted journal files for
>> databases in WAL mode.
> 
> If everybody does sqlite3_close() then those files are deleted on the last
> call to sqlite3_close().  If they are lingering, that indicates that
> somebody didn't do their sqlite3_close().

That's what I was afraid of.  Okay, that makes it certain.  I'll delete them 
this time, and see if some pop up again.

>> Is there some official method to delete them ?  I tried VACUUM on one and
>> when the connection was closed the journal files were deleted, but I don't
>> want to do that if their existence definitely indicates that my code is not
>> closing those files correctly.
> 
> Simply running:  "sqlite3 whatever.db .tables" should be sufficient to
> delete left-over -shm and -wal files.  If that doesn't work, it indicates
> that some other process still has the database open.

Will try that tomorrow.  Thanks.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to