Thread: does tuple store subtransaction id in it?

does tuple store subtransaction id in it?

From
Xiaoyulei
Date:
In XidInMVCCSnapshot, it will check xid from tuple if is in snapshot->subxip. It means tuple store subtransaction?

But in PushTransaction, I see TransactionState.subTransaction will assign currentSubTransactionId,
currentSubTransactionIdwill reinitialize in StartTransaction. So I think tuple should not store subtransaction id. 

I am confuse about this. If subtransaction id will reinitialize every start time. How to judge it is a subtransaction
fromxid in tuple? 







Re: does tuple store subtransaction id in it?

From
Haribabu Kommi
Date:
On Tue, Jun 16, 2015 at 1:08 PM, Xiaoyulei <xiaoyulei@huawei.com> wrote:
> In XidInMVCCSnapshot, it will check xid from tuple if is in snapshot->subxip. It means tuple store subtransaction?

Tuple stores only the transaction id related to the operation. This
can be either main transaction id or sub transaction id.

> But in PushTransaction, I see TransactionState.subTransaction will assign currentSubTransactionId,
currentSubTransactionIdwill reinitialize in StartTransaction. So I think tuple should not store subtransaction id.
 
>
> I am confuse about this. If subtransaction id will reinitialize every start time. How to judge it is a subtransaction
fromxid in tuple?
 

StartTransaction is called only once per transaction.Further on for
sub transactions it calls only startSubTransaction.
Hope this answers your question.

Regards,
Hari Babu
Fujitsu Australia