From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 2PC transaction id |
Date: | 2005-07-02 00:19:44 |
Message-ID: | 42C5DDA0.4010708@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Heikki Linnakangas wrote:
> On Fri, 1 Jul 2005, Oliver Jowett wrote:
>>
>> That implies it's valid (in fact, normal!) to enlist many different RMs
>> in the same transaction branch. Am I interpreting that correctly?
>
>
> I see. No, I don't think that's the correct interpretation, though now
> that you point it out, that paragraph is a bit confusing.
>
> What it means, is that the TM always calls xa_start(), xa_end() and
> xa_prepare() for a RM, even if the transaction doesn't actually have any
> work to do for the RM. It has to be like that in the XA world, because
> the TM doesn't know which RMs the application really uses in the
> transaction.
Sorry to keep beating on this, but I still don't see where the spec says
that you must have only one RM per transaction branch.
2.2.6 says:
> 2.2.6 Transaction Branches
> A global transaction has one or more transaction branches (or branches). A branch is a
> part of the work in support of a global transaction for which the TM and the RM
> engage in a separate but coordinated transaction commitment protocol (see Section 2.3
> on page 8). Each of the RM’s internal units of work in support of a global transaction is
> part of exactly one branch.
> A global transaction might have more than one branch when, for example, the AP uses
> multiple processes or is involved in the same global transaction by multiple remote
> APs.
So it seems to me that branches are intended to allow independent
processes / APs to each have an independent set of "tightly coupled
threads" (as all work on a particular branch is tightly-coupled).
There's no mention of having only one RM per branch, which I'd expect to
see here if it was a requirement.
One implication of the second paragraph is that a single-threaded AP can
use a single transaction branch for all the work it does.
> Disclaimer: I've never used an XA implementation, and I have only little
> experience with JTA.
Mostly the same here. It'd be useful to get input from someone who's
actually written XA code..
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2005-07-02 03:04:29 | Re: Autotools update |
Previous Message | Oliver Jowett | 2005-07-02 00:03:21 | Re: 2PC transaction id |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-07-02 01:16:05 | Re: Use of E'' in pg_dump |
Previous Message | Oliver Jowett | 2005-07-02 00:03:21 | Re: 2PC transaction id |