Re: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array - Mailing list pgsql-hackers

From Dewei Dai
Subject Re: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array
Date
Msg-id 2026010818414156467912@163.com
Whole thread Raw
In response to Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array
List pgsql-hackers
Hi Xuneng,

On Thu, Jan 8, 2026 at 4:15 PM Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
>
> v3-0001 fixes a critical issue where the snapshot->xip array in
> SnapBuildBuildSnapshot might not be sorted before reaching the
> consistent state. Sorry for the noise here.
>
>
 I just reviewed the v3 and I got a few comment
in function `SnapBuildAddCommittedTxns`
`builder->committed.xcnt_space = builder->committed.xcnt_space * 2 + 1`

Wouldn't it be more appropriate to use:
`builder->committed.cnt_space = builder->committed.xcnt_space * 2`


Best regards,

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Proposal: SELECT * EXCLUDE (...) command
Next
From: Hunaid Sohail
Date:
Subject: Re: Proposal: SELECT * EXCLUDE (...) command