On 21/01/2008, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > Sorry, I wasn't clear enough: > > If a connection fails and the transaction XID persists, how do you: > > * identify which XIDs are still pending (xa_recover) > > * tell the RM to drop all resources associacted with an XID > (xa_forget) > > once the TM has reconnected. These APIs appear to be needed > in order for the TM to be able to cleanup the RM after e.g. > a lost connection. > > OTOH, perhaps just doing a rollback with the known XID and > ignoring any errors would do the same without the need for > extra APIs.
There is nothing in the proposal I sent about recovery as I considered it out of scope for the initial API. Given the interest, it is probably worth adding. Finding out about outstanding transactions could be done with a Connection.xa_recover() method that returns a list of transaction IDs. In PostgreSQL this can be implemented with "SELECT gid from pg_prepared_xacts". For MySQL it can be implemented with "XA RECOVER". I don't know about others. For the xa_forget() call, does it differ from rolling back a prepared transaction? James. _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig