Re: does tuple store subtransaction id in it? - Mailing list pgsql-hackers

From Haribabu Kommi
Subject Re: does tuple store subtransaction id in it?
Date
Msg-id CAJrrPGc8BVYaDu+PBMaP4KuN13hJ6GncRc0s2jh0z55yGaM4DA@mail.gmail.com
Whole thread Raw
In response to does tuple store subtransaction id in it?  (Xiaoyulei <xiaoyulei@huawei.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Next
From: Prakash Itnal
Date:
Subject: Re: Auto-vacuum is not running in 9.1.12