Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state

From: Ajin Cherian <itsajin(at)gmail(dot)com>
To: cca5507 <cca5507(at)qq(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state
Date: 2025-03-27 04:57:58
Message-ID: CAFPTHDayQok5oC571tR+3dOuASVn=-b2ujGAX-BRbm7FXGabNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 27, 2025 at 2:47 PM cca5507 <cca5507(at)qq(dot)com> wrote:
>
> Hi,
>
> According to the comment above DecodeTXNNeedSkip(), transactions committed before SNAPBUILD_CONSISTENT state won't be decoded. It's important for initial table data synchronization because the table sync workers use the consistent snapshot to copy data so transactions before SNAPBUILD_CONSISTENT are already included in the initial data.
>
> This change may be redundant with SnapBuildXactNeedsSkip(), I add just for safe.
>
> --

I understand your explanation but was there a bug on HEAD that this is
solving? If so, can you write a test case to show this? This will make
it more convincing that this change as well is required. Your other
change has a test case to confirm, but this doesn't.

regards,
Ajin Cherian
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2025-03-27 05:00:07 Re: Latches vs lwlock contention
Previous Message Amul Sul 2025-03-27 04:48:46 Re: NOT ENFORCED constraint feature