"Allan, Mark" <[EMAIL PROTECTED]> wrote: > I definately have a problem when I disable journalling on version 3.2.7 > of SQLite. I dont see the same problem with 3.2.1 of SQlite. > I disable the journalling of the database file as described in my > earlier email. > With version 3.2.7 this causes SQlite to not sync the database file > after some updates (i.e. sqlite3OsSync() is not called). This means > that if power is lost before the database file is explicitly closed > we are losing those changes. > > I realise that the purpose of the journal file is to allow the database > to return to its last valid state if power is lost during an update, > however we believe that in our system we will not need this as our > flash filing system is 100% power safe. i.e. it will return to the > last flushed state of the file on power loss. So we believe that not > only is the journalling of the database time consuming it is also > unnecessary for us, which is a little annoying. > > If this is a bug in 3.2.7 of SQlite can it be fixed? If I cannot > disable the journal file safely by the mechanism described in my > previous email then can somebody please indicate how I can disable > journalling of the database safely. >
The ability to disable journalling is not a supported behavior of SQLite. If you can get it to work, that's great. But if not, that is not considered a bug. The omitJournal flag on sqlite3BtreeFactory() is used for transient tables that are never rolled back and which we do not care about if there is a program crash or power failure. The system should never call sqlite3OsSync() on such files because sqlite3OsSync() is an expensive operation (on most platforms) and for a transient file it does not accomplish anything useful. If version 3.2.1 was calling sqlite3OsSync() on unjournalled files, then that was a performance bug. I have no specific memory of fixing that problem in 3.2.7, but a lot of little problems were fixed in between those two releases, so it seems plausible that this was one of them. So my best guess is that if your journal-less use of SQLite worked with version 3.2.1 then that was due to a bug in 3.2.1 that has since been fixed - not a bug that has been introduced. -- D. Richard Hipp <[EMAIL PROTECTED]>