Re: minor improvement in snapbuild: use existing interface and removefake code

Поиск
Список
Период
Сортировка
От ocean_li_996
Тема Re: minor improvement in snapbuild: use existing interface and removefake code
Дата
Msg-id 316766f4.a513.19a97c9db73.Coremail.ocean_li_996@163.com
обсуждение исходный текст
Ответ на Re: minor improvement in snapbuild: use existing interface and removefake code  ("cca5507" <cca5507@qq.com>)
Список pgsql-hackers

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.
> See threads in this for details: https://commitfest.postgresql.org/patch/5029/

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
Вложения

В списке pgsql-hackers по дате отправления: