Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2012-01-25 Thread Joril
An entirely new database connection can resume this transaction by again calling BEGIN PREPARED with the same XID. I'm sorry, but I can't find this command inside the Postgresql docs... Am I missing something? I'm trying to do a multi-request two-phase transaction too, so I thought I

Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2012-01-25 Thread Michael Bayer
On Jan 25, 2012, at 10:05 AM, Joril wrote: An entirely new database connection can resume this transaction by again calling BEGIN PREPARED with the same XID. I'm sorry, but I can't find this command inside the Postgresql docs... Am I missing something? PREPARE TRANSACTION.

Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2012-01-25 Thread Joril
So I guess the idea is that each web request does a new PREPARE TRANSACTION with a unique xid, then when the results of all those requests are ready to be committed, the final call then calls COMMIT PREPARED on the full list of xids. I see... Many thanks for your timely explanation :)

Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2011-12-18 Thread Andronikos Nedos
On Saturday, 17 December 2011 19:57:10 UTC, Michael Bayer wrote: On Dec 17, 2011, at 2:24 PM, Andronikos Nedos wrote: So, if I understand correctly, I need to maintain the Connection object between requests and on the 2nd request bind a session to the existing Connection object and

[sqlalchemy] How to refer to a live SA transaction from subsequent requests

2011-12-17 Thread Andronikos Nedos
Hi all, We make heavy use of SqlAchemy in our app and use a custom 2-phase commit protocol over HTTP to communicate with mobile devices. While all read,write,deletes happen in a first HTTP request, a subsequent HTTP request needs to find the transaction and either commit or abort. i.e.,

Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2011-12-17 Thread Michael Bayer
On Dec 17, 2011, at 9:04 AM, Andronikos Nedos wrote: Hi all, We make heavy use of SqlAchemy in our app and use a custom 2-phase commit protocol over HTTP to communicate with mobile devices. While all read,write,deletes happen in a first HTTP request, a subsequent HTTP request needs

Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2011-12-17 Thread Andronikos Nedos
On Saturday, 17 December 2011 17:22:26 UTC, Michael Bayer wrote: On Dec 17, 2011, at 9:04 AM, Andronikos Nedos wrote: Hi all, We make heavy use of SqlAchemy in our app and use a custom 2-phase commit protocol over HTTP to communicate with mobile devices. While all read,write,deletes

Re: [sqlalchemy] How to refer to a live SA transaction from subsequent requests

2011-12-17 Thread Michael Bayer
On Dec 17, 2011, at 2:24 PM, Andronikos Nedos wrote: So, if I understand correctly, I need to maintain the Connection object between requests and on the 2nd request bind a session to the existing Connection object and then session.commit() or session.abort() ? The question now is how