Re: psycopg and two phase commit

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psycopg and two phase commit
Date: 2010-09-19 17:48:46
Message-ID: AANLkTikmHnm_gG2zDB6sM=KFFVvC+kd80sR4XXjHJ_Hj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

2010/9/19 Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>:
> On Sat, Sep 18, 2010 at 5:01 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> Hello
>>
>> who is psycopg maintainer, please?
>
> Here is one. The others can be usually mailed on the psycopg mailing
> list, which is currently down and being recovered.
>
>> Can somebody explains to me, why
>> psycopg doesn't support twophase commit still, although some
>> implementation was done in summer 2008?
>
> Probably because nobody has asked before and it has been nobody's itch
> to scratch.
>
> The work you probably refer to seems Jason Henstridge's. I didn't know
> anything about it, but I've bcc'd him so he can provide details.
>
>  https://code.launchpad.net/~jamesh/psycopg/two-phase-commit
>
>> Now two phase commit is part of DB-API, so can be implemented.
>>
>> There are some bariers?
>
> I see none at a first glance. I just don't get the intricacies of the
> .xid() method suggested in the dbapi
> (http://www.python.org/dev/peps/pep-0249/) while a regular string
> would do - and the xid has to be converted in a string anyway to be
> passed to the Postgres TPC statements. So I'm tempted to allow the
> tpc_*() methods to accept a simple string too as parameter; also
> because otherwise psycopg wouldn't be able to manipulate a transaction
> prepared by other tools (e.g. retrieving a xid using tpc_recover() and
> passing it to tpc_commit()/tpc_rollback(), a limitation that can be
> avoided.
>

These are a good news. I hope so I'll a some time on begin of October,
when I can to play with this topic. But this must not be a too much
hard work.

Thank you

Pavel Stehule

> I can work on the feature, first I'd like to review James's code and
> possibly hear from him his impressions.
>
> -- Daniele
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-19 17:51:20 Re: psql's \dn versus temp schemas
Previous Message Peter Eisentraut 2010-09-19 17:47:38 Re: BUG #5662: Incomplete view