Re: 2PC transaction id

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: 2PC transaction id
Дата
Msg-id 42C487A8.70003@opencloud.com
обсуждение исходный текст
Ответ на Re: 2PC transaction id  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: 2PC transaction id  (Oliver Jowett <oliver@opencloud.com>)
Re: 2PC transaction id  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-hackers
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)

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.

-O


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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [PATCHES] Dbsize backend integration
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: 2PC transaction id