journal file created when journal_mode=OFF
(1) By Maurizio (Mauri4deejay) on 2021-10-06 07:59:40 [link]
I'm using SQLite dll 3.36.0 downloaded from sqlite.org on Windows 10 and I'm having trouble with journal file. My goal is to disable completely journal file on disk so I'm using the following pragmas at runtime: PRAGMA synchronous=OFF PRAGMA count_changes=OFF PRAGMA journal_mode=OFF PRAGMA temp_store=MEMORY A query about current journal mode with "pragma journal_mode" returns "off" but on data insert or replace a "db-journal" file is always created on disk. Maybe I'm missing something? Thanks in advance for any suggestion.
(2) By Larry Brasfield (larrybr) on 2021-10-06 17:58:26 in reply to 1 [link]
I have a few suggestions:<br> 1. Find a way to avoid using the count_changes pragma. It is deprecated.<br> 2. Reduce your scenario to a set of meta-commands and SQL statements that the CLI shell can run.<br> 3. Read the docs for the members of the step 2 set.<br> 4. Post here the minimal repro set of step 2 and remaining questions. Time ordering of operations will have an effect upon the outcome, and is not apparent in your post. So please consider my 4-step procedure to be a good way to clarify what you are doing, (if this proves necessary after doing step 3.)
(3) By Marco Bubke (marcob) on 2021-10-07 06:21:14 in reply to 2
Have you looked into https://www.sqlite.org/pragma.html#pragma_locking_mode? With locking node exclusive there is only an in-memory Wal log. So you get only your database file.
(4) By Maurizio (Mauri4deejay) on 2021-10-07 09:31:56 in reply to 2 [link]
Following your suggestions I'm able to verify sqlite works as expected. The problem was caused by a stupid mistake in my code causing a mixed up connections use. Thank you for your support. Sorry for the noise. Best regards.