[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-19 Thread Simon Slavin
On 19 Aug 2015, at 1:44pm, Richard Hipp wrote: > On Unix, unlink() after open is used. > > On Windows, the FILE_FLAG_DELETE_ON_CLOSE flags is used when the > temporary file is opened. I was wrong. Apologies. Simon.

[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-19 Thread Simon Slavin
On 19 Aug 2015, at 1:36pm, Keith Medcalf wrote: > Meaning that on a persistent temp storage the files will stay forever (or > until a manually deleted). Then again, on systems such as windows where temp > files are never deleted this is to be expected. Hmm. On every Unix box I've seen /tmp

[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-19 Thread Simon Slavin
On 18 Aug 2015, at 8:40pm, Sam Roberts 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

[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-19 Thread Richard Hipp
On 8/18/15, Sam Roberts wrote: > What mechanism is used to create the temporary files? On Unix, unlink() after open is used. On Windows, the FILE_FLAG_DELETE_ON_CLOSE flags is used when the temporary file is opened. -- D. Richard Hipp drh at sqlite.org

[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-19 Thread Keith Medcalf
> On 19 Aug 2015, at 1:36pm, Keith Medcalf wrote: > > Meaning that on a persistent temp storage the files will stay forever > (or until a manually deleted). Then again, on systems such as windows > where temp files are never deleted this is to be expected. > Hmm. On every Unix box I've seen /

[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-19 Thread Keith Medcalf
> 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 >

[sqlite] do temporary on-disk databases get cleaned up on abnormal process termination?

2015-08-18 Thread Sam Roberts
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 sufficie