Re: 2PC transaction id

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 2PC transaction id
Date: 2005-07-01 00:53:51
Message-ID: 21DB5AC3-AAA9-49DA-9758-76BA90827F67@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


On 30-Jun-05, at 8:00 PM, Oliver Jowett wrote:

> Dave Cramer wrote:
>
>> I'm thinking of the situation where one transaction occurs on
>> more than
>> one backend, and there is
>> more than one transaction manager.
>>
>
> XA XIDs are *global* IDs, i.e. they are unique even with more than one
> TM involved. It's the responsibility of the TM to generate a
> globally-unique XID.
>
> If you have two different databases involved in the same global
> transaction, then yes, the two backends could be told to use the same
> global XID. That's normal. (they don't *have* to be given the same XID
> as they could be participating in two independent branches of the same
> global transaction, and in that case the global XIDs will have
> different
> branch qualifiers)
I understand this
>
> It's even possible for one resource to do two different independent
> (local) transactions that are part of the same global transaction
> -- in
> that case, the local transactions will be given different XIDs though.
>
> But all of this allocation / management of XIDs is done by the TM, the
> individual resources don't need to do anything beyond associating
> particular transactions with client-supplied XIDs, which we already do
> AFAIK.
I was actually thinking more of the people without the advantage of
an application server
Also for the case where some lowlevel replicator wanted to use 2PC.
Probably a moot point
as anyone capable of writing one is also capable of getting a unique XID
>
> -O
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jw 2005-07-01 01:29:44 How to let more than one sessions work for same global transaction ?
Previous Message Oliver Jowett 2005-07-01 00:37:50 Re: 2PC transaction id

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-07-01 01:28:18 ecpg: check for strdup() failure
Previous Message Oliver Jowett 2005-07-01 00:37:50 Re: 2PC transaction id