For the record, the problem was that django (by default) starts a transaction before handing an http request, then commits it after the request is handled.
Since we were in the middle of a transaction, all the python/django code we wrote saw the state of the DB as it was partially through a transaction, but external code didn't see the changes on disk yet. We didn't realize that we were opertaing within an uncommitted transaction, so had a the race condition where we kicked off an external process to backup the DB after the DELETE was complete, and it would sometimes see the changes, and sometimes not, depending on what happened first - the request handler completing and transaction getting committed, or the external process starting up and locking the DB. I think there is something specific about the relative speeds of the handlers that do DELETEs vs. INSERTs that biased the race condition, so who won depended on the action and led us down the wrong path. Anyhow, thanks for your help. Cheers, Sam _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users