Hi everyone!
I'm trying to do a two-phase commit using SQLalchemy 0.6.8 with
Postgresql 8.3.4, but I think I'm missing something...
The workflow goes like this:

session = sessionmaker(engine)(autocommit=True)
tx = session.connection().begin_twophase(xid) # Doesn't issue any SQL
session.begin() # Issues a BEGIN that marks transaction boundary
session.add(obj1)
session.flush()
tx.prepare()

then from another session

session = sessionmaker(engine)(autocommit=True)
session.connection().commit_prepared(xid, recover=True) # recover=True
because otherwise it complains that you can't issue a COMMIT PREPARED
from inside a transaction

This doesn't raise any error, but doesn't write anything to the table
either... O_o What am I missing?

I tried even blocking the application after the prepare() and issuing
a COMMIT PREPARED 'xid' from pgadmin, but still nothing gets written.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to