On 18 Aug 2015, at 8:40pm, Sam Roberts <sam at strongloop.com> wrote:

> The docs say you have to close the DB handle to clean them up. I'm
> concerned that if a process is SIGKILLed or just exits abruptly that
> the temporary DBs will accumulate on disk.
> 
> What mechanism is used to create the temporary files? If the file is
> unlinked after open, then process exit is sufficient, but I haven't
> been able to trigger data overflow onto disk in my quick testing.

The file is not unlinked after open.  This can't be done because the files may 
be closed and reopened in the course of their use.  So if your process is 
forced-quit then the temporary files will continue to exist.

Some temporary files have fixed names so they will be replaced the next time 
SQLite tries to perform the same operation, and deleted when that one finishes. 
 Others will just hang about until the computer is rebooted and will be deleted 
with other temporary files either on shutdown or on restart.  This is the same 
thing that happens to other files in the temporary file folder.

Simon.

Reply via email to