Hi ChangAo,
Thanks for your comments.
At 2025-11-18 10:47:20, "cca5507" <cca5507@qq.com> wrote:
> Is there a test case can reproduce the assert fail in SnapBuildGetOrBuildSnapshot()?
>
After exploring the logicalmsg_decode(),I think the Assert in SnapBuildGetOrBuildSnapshot() will not fail.
But the assert in SnapBuildGetOrBuildSnapshot() can be removed if we want to reuse it.
> We skip xact_decode() when SnapBuildCurrentState(builder) < SNAPBUILD_FULL_SNAPSHOT, but it's a bug, so your NO.3 modification might be wrong.
>
Wow, what a nice surprise! A few days ago, I reported a bug in [1], which I believe is the same issue you have described here.
Unfortunately, I was not able to provide a simple reproduction case at that time — but now we seem to have one :).
Regarding the fix for that issue: I will review the patch you have provided. My current idea is to update the snapshot using
builder->xmin once we reach the SNAPBUILD_CONSISTENT state. If you have any thoughts, please feel free to join the
discussion in [1].
As for the comment about this path, I can revert it currently.
Please find the updated patch attached.
Regards,
Haiyang Li