[Libpqxx-general] Two phase commit
Jeroen T. Vermeulen
jtv at xs4all.nl
Fri Aug 14 19:22:36 UTC 2009
On Thu, August 6, 2009 15:14, Maurice Gittens wrote:
> Hi,
Hi Maurice,
> So my question is;
> - is it possible to use two phase commit with pqxx?
> - If not, is it safe to work around this limitation by reusing the
> underlying connection
> to issue the "prepare transaction" and "commit prepared" statements my
> self?
Unfortunately there's no support for tpc yet. Something I've wanted to
add for a long time, really.
If you want to work around it, you can set up a nontransaction and do your
own begin/prepare/commit directly in SQL. But you'll want to inhibit
connection reactivation, so that if your connection breaks halfway through
your transaction, you don't quietly reconnect.
You'll probably want to allow this again after you prepare the
transaction. :-)
Jeroen
More information about the Libpqxx-general
mailing list