Kevin, >I have confirmed that the DELETE does indeed delete the record, but >only after Django's delete callback has completed. If what you say is >true, that DELETEs are proceed immediately, then the only other >explanation is that Django, upon sending of the post_delete signal, >has not actually run the SQL DELETE command. Note, however, that >Django provides a means of checking which SQL commands it has run, and >when the callback function is entered, Django claims that the DELETE >statement has been executed.
With out-of-the-box build and unless specific pragmas are used, the physical writes are guaranted to have taken place when the write transaction (or statement in auto-commit mode) is completed successfully. This is of course modulo the OS and hardware layers not lying to SQLite. I don't know Django and what it does behind the scene. It the write --say a delete-- successfully completes but you still can see that row afterwards using another connection, that probably means that Django and/or your OS and/or your hardware is/are cheating. >Perhaps it would be easier to get assistance if I ask my question in a >different way. What I am really trying to do is database mirroring: I >have my db file on disk, and I have a backup on a USB drive, and I >want the contents of both to be the same at all times. I am currently >trying to do this by using Django's db hooks; on every modification I >do an OS copy of the file to the USB drive. Does sqlite provide >support for doing this? SQLite has a backup feature but it isn't exactly what you want. Lookup the backup API in the documentation. It's an asynchronous process but if your DB isn't huge, if you only seldom update it (i.e. not 50 updates/s) and run the backup frequently enough, it's just fine. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users