On 07/06/2016 11:10 PM, Chris Brody wrote:
Just for my information, what is the purpose of this temporary file?  I see
that -journal file is always stored to disk.

It's a statement journal:

   https://www.sqlite.org/tempfiles.html#stmtjrnl

Recent changes mean that the first 64KiB of a statement journal are always
stored in main-memory, and the temp file only created after the file grows
larger than 64KiB. Which is probably why you did not see the problem
immediately.

Personally I wish SQLite would fail upon open or perhaps on first write if
it cannot write the temporary file. I think this would make it easier for
programmers to detect and deal with this kind of issue. Maybe make it an
explicit compile-time option to wait until the temporary file is larger
than 64KiB before opening the temp file. Just a thought.

Right now it works the other way around - you can explicitly build or configure SQLite to create statement/savepoint journals as soon as they are required:

  https://www.sqlite.org/compile.html#stmtjrnl_spill

Dan.

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

Reply via email to