On 17 Aug 2009, at 3:47pm, Angus March wrote:

> I was concerned
> that the documentation might be playing fast and loose, saying that
> fflush (or fsync, or fdatasync) won't be called, when it really means
> that it won't be called during any call to step() or finalize(), while
> it would be called when the session is closed. I wasn't sure, so I
> thought I'd ask, because it'll matter to my app.


Although the SQLite code might not be syncing, it is still issuing the  
commands to write data to the database file (at least I assume it  
does).  Various events can send a synchronisation event all the way up  
(or down) the chain of command.  For instance, a hard disk which goes  
to sleep due to inactivity will trigger a sync before they sleep; a  
laptop which is about to sleep due to low battery will often flush  
queued writes; in some operating systems the OS will issue a sync for  
files handled by a process about to be swapped out of active memory.

So no, you cannot depend on no writing to disk just because you've  
told SQLite not to synchronise every transaction.  If you don't want  
your record written to disk, don't issue the INSERT command.  Perhaps  
you could use a virtual table or something.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to