About `GetNonHistoricCatalogSnapshot`: does it allow developers to use catalog snapshot to scan non-catalog tables?

Поиск
Список
Период
Сортировка
От Xiaoran Wang
Тема About `GetNonHistoricCatalogSnapshot`: does it allow developers to use catalog snapshot to scan non-catalog tables?
Дата
Msg-id DS0PR05MB96894638B505FCC646AD9DD0BA37A@DS0PR05MB9689.namprd05.prod.outlook.com
обсуждение исходный текст
Список pgsql-hackers
Hi,
I have a question about the routine "GetNonHistoricCatalogSnapshot".
It has a param "Oid relid​​". It firstly
checks if the relation has systemcache or ​if it is in "RelationInvalidatesSnapshotsOnly" related relations.
If yes, it will invalidate the CatalogSnapshot.

I just wonder in which situation the developer tries to scan a non-catalog table by CatalogSnapshot. 

By the way, in the routine " SnapshotSetCommandId", there is a comment 

 /* Should we do the same with CatalogSnapshot? */

From my point of view, there is no need to update the curcid of CatalogSnapshot,  as the CatalogSnapshot
will be invalidated if there are any updates on the catalog tables in the current transaction.

If I misunderstood, please correct me!

Best regards, xiaoran

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Consistent coding for the naming of LR workers
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL