Re: 2PC transaction id

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: 2PC transaction id
Дата
Msg-id 42C5172F.6070909@opencloud.com
обсуждение исходный текст
Ответ на Re: 2PC transaction id  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: 2PC transaction id  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Heikki Linnakangas wrote:
> On Fri, 1 Jul 2005, Oliver Jowett wrote:
> 
>> Heikki Linnakangas wrote:
>>
>>> branch id: Branch Identifier. Every RM involved in the global
>>> transaction is given a *different* branch id.
>>
>>
>> Hm, I am confused then -- the XA spec definitely talks about enlisting
>> multiple RMs in a single transaction branch.
>>
>> Can you explain?
> 
> I oversimplified a bit. The TM *can* enlist multiple threads of control
> (= connection in JTA) to the same transaction branch. That's called
> "tightly-coupled threads", and they should then be treated as one local
> transaction in the RM.

Ok, I understand that case.

What I'm confused about is, for example, 3.3.1 in the DTP:XA spec:

> 3.3.1 Registration of Resource Managers
> Normally, a TM involves all associated RMs in a transaction branch. (The TM’s set of
> RM switches, described in Section 4.3 on page 21 tells the TM which RMs are
> associated with it.) The TM calls all these RMs with xa_start(), xa_end(), and
> xa_prepare (), although an RM that is not active in a branch need not participate further
> (see Section 2.3.2 on page 8). A technique to reduce overhead for infrequently-used
> RMs is discussed below.

That implies it's valid (in fact, normal!) to enlist many different RMs
in the same transaction branch. Am I interpreting that correctly?

-O


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: 2PC transaction id
Следующее
От: Neil Conway
Дата:
Сообщение: Re: pl/pgsql: END verbosity [patch]