[Libpqxx-general] Two phase commit
Maurice Gittens
mainmanmauricio at gmail.com
Sat Aug 15 10:59:50 UTC 2009
Hi Jeroen,
Sorry, the late follow up. I seem to have missed your reply.
> 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.
>
Can you give a sketch of the design and the API's you have in mind?
Maybe, it is doable without too much work.
>
> 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. :-)
>
:-)
So basically, if I use non-transactions for everything, then I can simply
issue the
SQL statements directly to the underlying connection?
Hmm, this sounds tempting, since I can use SQL statements for transaction
management and
libpqxx functionality for everything else, Right?
Thanks.
Kind regards,
Maurice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/libpqxx-general/attachments/20090815/e3a7558d/attachment.html>
More information about the Libpqxx-general
mailing list