Re: Confused about TransactionIdSetTreeStatus

From: Japin Li <japinli(at)hotmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Confused about TransactionIdSetTreeStatus
Date: 2022-10-25 15:09:03
Message-ID: MEYP282MB16690BC96DFBE08CC857E1E3B6319@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Tue, 25 Oct 2022 at 22:46, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> On 25/10/2022 12:02, Japin Li wrote:
>> However, the code marks the main transaction and subtransactions directly
>> to the committed.
>
> Hmm, yeah, step 2 in this example doesn't match reality. We actually
> set t and t1 directly as committed. The explanation above that comment
> is correct, but the example is not. It used to work the way the
> example says, but that was changed in commit
> 06da3c570f21394003fc392d80f54862f7dec19f. Ironically, that commit also
> added the outdated comment.
>
> The correct example would be:
>
> TransactionId t commits and has subxids t1, t2, t3, t4 t is on page
> p1, t1 is also on p1, t2 and t3 are on p2, t4 is on p3
> 1. update pages2-3:
> page2: set t2,t3 as sub-committed
> page3: set t4 as sub-committed
> 2. update page1:
> page1: set t,t1 as committed,
> 3. update pages2-3:
> page2: set t2,t3 as committed
> page3: set t4 as committed
>

Thanks for your explanation. Attach a patch to remove the outdated comment.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

Attachment Content-Type Size
v1-0001-Remove-outdated-comment-for-TransactionIdSetTreeS.patch text/x-diff 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim Gündüz 2022-10-25 15:28:03 Re: [PATCH] Fix build with LLVM 15 or above
Previous Message David Christensen 2022-10-25 14:55:21 Re: [PATCHES] Post-special page storage TDE support