Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-21 Thread Xiaoran Wang
Hi, I updated the comment about the CatalogSnapshot `src/backend/utils/time/ snapmgr.c` Xiaoran Wang 于2023年12月18日周一 15:02写道: > Hi, > Thanks for your reply. > > jian he 于2023年12月18日周一 08:20写道: > >> Hi >> ---setup. >> drop table s2; >> create table s2(a int); >> >> After apply the patch >> alter

Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-17 Thread Xiaoran Wang
Hi, Thanks for your reply. jian he 于2023年12月18日周一 08:20写道: > Hi > ---setup. > drop table s2; > create table s2(a int); > > After apply the patch > alter table s2 add primary key (a); > > watch CatalogSnapshot > > #0 GetNonHistoricCatalogSnapshot (relid=1259) > at > ../../Desktop/pg_src

Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-17 Thread jian he
Hi ---setup. drop table s2; create table s2(a int); After apply the patch alter table s2 add primary key (a); watch CatalogSnapshot #0 GetNonHistoricCatalogSnapshot (relid=1259) at ../../Desktop/pg_src/src7/postgresql/src/backend/utils/time/snapmgr.c:412 #1 0x55ba78f0d6ba in GetCat

Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-12 Thread Xiaoran Wang
Hi hackers, I would like to give more details of my patch. In postgres, it uses a global snapshot “CatalogSnapshot” to check catalog data visibility. “CatalogSnapshot” is always updated to the latest version to make the latest catalog table content visible. If there is any updating on catalo

[PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages

2023-12-06 Thread Xiaoran Wang
Hi hackers, For local invalidation messages, there is no need to call `InvalidateCatalogSnapshot` to set the CatalogSnapshot to NULL and rebuild it later. Instead, just update the CatalogSnapshot's `curcid` in `SnapshotSetCommandId`, this way can make the CatalogSnapshot work well too. This o