Re: 2PC transaction id
От | Oliver Jowett |
---|---|
Тема | Re: 2PC transaction id |
Дата | |
Msg-id | 42C5DDA0.4010708@opencloud.com обсуждение исходный текст |
Ответ на | Re: 2PC transaction id (Heikki Linnakangas <hlinnaka@iki.fi>) |
Ответы |
Re: 2PC transaction id
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: