SQLite Forum

Empty journal files left on disk after connection was gracefully closed
Login
By READ-ONLY connection I am referring to an sqlite connection that was opened by a call to **::sqlite3_open_v2(..)** with the flag **SQLITE_OPEN_READONLY**.

My assumption is that if I opened this connection with this flag then this connection can be used only for reading, hence *'READ-ONLY connection'*.

*Important clarification: For this particular database-file that I open in READ-ONLY mode there is only one connection attached - this connection.*

I read in sqlite documentation that the WAL attribute is persistent, meaning that if I will open a file that was previously used with **WAL** journal, **and if** I will not specify journal-mode then I will receive **WAL**. For this reason I asked whether for such a *READ-ONLY connection* the above settings  [**journal-mode:OFF**; **syncronous=0**] are valid, or at all needed?