Re: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array

From: "Dewei Dai" <daidewei1970(at)163(dot)com>
To: "Neil Chen" <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, "Xuneng Zhou" <xunengzhou(at)gmail(dot)com>
Cc: "Pgsql Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Masahiko Sawada" <sawada(dot)mshk(at)gmail(dot)com>, "Michael Paquier" <michael(at)paquier(dot)xyz>, "Kirill Reshke" <reshkekirill(at)gmail(dot)com>
Subject: Re: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array
Date: 2026-01-08 10:41:45
Message-ID: 2026010818414156467912@163.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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,

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hunaid Sohail 2026-01-08 11:07:30 Re: Proposal: SELECT * EXCLUDE (...) command
Previous Message John Naylor 2026-01-08 10:27:05 Re: Proposal: SELECT * EXCLUDE (...) command