On 21/01/2008, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > Thanks for the explanations. I was actually thinking of the > connection between the TM and the RM (the database backend). > The typical behavior of a TM is to cancel the ongoing > two-phase commit transaction if an RM becomes unavailable.
Stuart's use case is if the RM dies during the second phase of the commit. It is an edge case, but then 2PC is all about edge cases :) If it happens before that point, then rolling back is appropriate. > However, I can see your point. If the data stays on the > database server and can be addressed via the XID, then a > dropped connection wouldn't hurt all that much. > Then again: how do you tell the database to forget about > the data stored for an XID ? You ask for the transaction to be rolled back (e.g. "ROLLBACK PREPARED xid" in PostgreSQL, and "XA ROLLBACK xid" for MySQL). James. _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig