Subject: RE: Fix logical decoding not track transaction during SNAPBUILD_BUILDING_SNAPSHOT

From: "Hayato Kuroda (Fujitsu)" <[email-masked]>
Date: Tue, 27 Jan 2026 02:17:26 +0000

Dear Li,

Sorry, can you evaluate bit more why the 0003 patch is enough for the fix? E.g.,
apart from 0001, 0003 adds invalidation message to the transaction (or immediately
invalidate) even if we do not have the consistent snapshot yet.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

---

From: ocean_li_996 <[email-masked]>
Date: Thu, 29 Jan 2026 02:52:27 +0800 (CST)

Hi Hayato,

>invalidate) even if we do not have the consistent snapshot yet.

Yeah. IIUC, the 0003 patch can fix this issue.

The 0003 patch involves the least amount of code changes, but the trade‑off is that
it adds extra computation and memory usage, which may affect efficiency. This is because,
during the transition from SNAPBUILD_BUILDING_SNAPSHOT to SNAPBUILD_FULL_SNAPSHOT, useless
XIDs (see the definition of useless XIDs in the 0004 patch) will be added to the reorder buffer.

The regular changes of these useless‑XID transactions will not be added to the reorder buffer
(see SnapBuildProcessChange). Invalidation messages with a useless XID will be added to the
reorder buffer, but will not be processed, because the transaction does not yet have a base
snapshot (see ReorderBufferForget). As for invalidation messages without an XID, they will still
be executed, but this will not cause correctness issues, since we are still in a state where
changes cannot be decoded.

Regards
Haiyang Li