From 128637864b9311fbe5140af5b8959c30281d032d Mon Sep 17 00:00:00 2001 From: Zhang Mingli Date: Thu, 5 Dec 2024 15:39:46 +0800 Subject: [PATCH 1/2] Make gp_matview_aux and gp_matview_tables unshared catalog. There is no need to share those across databases. One only need to know its own matview status. Authored-by: Zhang Mingli avamingli@gmail.com --- src/backend/catalog/catalog.c | 10 ---------- src/include/catalog/gp_matview_aux.h | 2 +- src/include/catalog/gp_matview_tables.h | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c index 0f217d73fea..e524303d472 100644 --- a/src/backend/catalog/catalog.c +++ b/src/backend/catalog/catalog.c @@ -570,16 +570,6 @@ IsSharedRelation(Oid relationId) return true; } - /* materialized view aux and its indexes */ - if (relationId == GpMatviewAuxId || - relationId == GpMatviewAuxMvoidIndexId || - relationId == GpMatviewAuxMvnameIndexId || - relationId == GpMatviewAuxDatastatusIndexId || - relationId == GpMatviewTablesId || - relationId == GpMatviewTablesMvRelIndexId || - relationId == GpMatviewTablesRelIndexId) - return true; - /* warehouse table and its indexes */ if (relationId == GpWarehouseRelationId || relationId == GpWarehouseOidIndexId || diff --git a/src/include/catalog/gp_matview_aux.h b/src/include/catalog/gp_matview_aux.h index febd9513751..3dca7a526cf 100644 --- a/src/include/catalog/gp_matview_aux.h +++ b/src/include/catalog/gp_matview_aux.h @@ -23,7 +23,7 @@ /* * Defines for gp_matview_aux */ -CATALOG(gp_matview_aux,7153,GpMatviewAuxId) BKI_SHARED_RELATION +CATALOG(gp_matview_aux,7153,GpMatviewAuxId) { Oid mvoid; /* materialized view oid */ NameData mvname; /* materialized view name */ diff --git a/src/include/catalog/gp_matview_tables.h b/src/include/catalog/gp_matview_tables.h index 8592d776033..af187e9718f 100644 --- a/src/include/catalog/gp_matview_tables.h +++ b/src/include/catalog/gp_matview_tables.h @@ -26,7 +26,7 @@ /* * Defines for gp_matview_tables */ -CATALOG(gp_matview_tables,7150,GpMatviewTablesId) BKI_SHARED_RELATION +CATALOG(gp_matview_tables,7150,GpMatviewTablesId) { Oid mvoid; /* materialized view oid */ Oid relid; /* base table oid */ From c7a212b5f1922461dfb90dee9e6c71aea052444b Mon Sep 17 00:00:00 2001 From: Zhang Mingli Date: Thu, 5 Dec 2024 23:41:51 +0800 Subject: [PATCH 2/2] bump catversion --- src/include/catalog/catversion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 93497914451..8ac4a14a7cf 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -56,6 +56,6 @@ */ /* 3yyymmddN */ -#define CATALOG_VERSION_NO 302407192 +#define CATALOG_VERSION_NO 302412051 #endif