Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state
От | Ajin Cherian |
---|---|
Тема | Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state |
Дата | |
Msg-id | CAFPTHDZaKuS8j72C5s63Hisq6ZRCUu4+xTRSc31_vHgRhaHxzg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state ("cca5507" <cca5507@qq.com>) |
Ответы |
Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state
|
Список | pgsql-hackers |
On Wed, Mar 26, 2025 at 9:11 PM cca5507 <cca5507@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
В списке pgsql-hackers по дате отправления: