On Wed, Mar 26, 2025 at 9:11 PM cca5507 <cca5...@qq.com> wrote: > > Hi, > > Thanks for the comments! > > Here are the new version patches, I think it will be more clear. > > --
+ { + /* + * Note that during or after BUILDING_SNAPSHOT, we need handle the xlog + * that might mark a transaction as catalog modifying because the snapshot + * only tracks catalog modifying transactions. The transaction before + * BUILDING_SNAPSHOT will not be tracked anyway(see SnapBuildCommitTxn() + * for details), so just return. + */ + if (SnapBuildCurrentState(builder) >= SNAPBUILD_BUILDING_SNAPSHOT) + { + /* Currently only XLOG_HEAP2_NEW_CID means a catalog modifying */ + if (info == XLOG_HEAP2_NEW_CID && TransactionIdIsValid(xid)) + ReorderBufferXidSetCatalogChanges(ctx->reorder, xid, buf->origptr); + } Any reason why you avoided calling SnapBuildProcessNewCid here and only called ReorderBufferXidSetCatalogChanges? If any, please mention in the comments the reason. regards, Ajin Cherian Fujitsu Australia