mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-12-03 12:47:34 +08:00
hot data precache modify pg_hot_data table
This commit is contained in:
parent
489321b453
commit
c5204f547d
@ -265,7 +265,7 @@ IsSharedRelation(Oid relationId)
|
||||
relationId == AuthMemMemRoleIndexId ||
|
||||
relationId == DatabaseNameIndexId ||
|
||||
relationId == DatabaseOidIndexId ||
|
||||
relationId == HotDataDatnameRelnameIndexId ||
|
||||
relationId == HotDataDatnameRelnameIndexIndexId ||
|
||||
relationId == SharedDescriptionObjIndexId ||
|
||||
relationId == SharedDependDependerIndexId ||
|
||||
relationId == SharedDependReferenceIndexId ||
|
||||
|
@ -82,7 +82,11 @@ BitmapHeapNext(BitmapHeapScanState *node)
|
||||
ParallelBitmapHeapState *pstate = node->pstate;
|
||||
dsa_area *dsa = node->ss.ps.state->es_query_dsa;
|
||||
|
||||
preCacheIndexNode = ((BitmapIndexScanState *)((PlanState *)(node))->lefttree)->biss_ScanDesc->indexRelation->rd_node.relNode;
|
||||
/* set preCacheIndexNode */
|
||||
if (isPreCacheIndex)
|
||||
{
|
||||
preCacheIndexNode = ((BitmapIndexScanState *)((PlanState *)(node))->lefttree)->biss_ScanDesc->indexRelation->rd_node.relNode;
|
||||
}
|
||||
|
||||
/*
|
||||
* extract necessary information from index scan node
|
||||
|
@ -66,6 +66,12 @@ IndexOnlyNext(IndexOnlyScanState *node)
|
||||
TupleTableSlot *slot;
|
||||
ItemPointer tid;
|
||||
|
||||
/* set preCacheIndexNode */
|
||||
if (isPreCacheIndex)
|
||||
{
|
||||
preCacheIndexNode = node->ioss_RelationDesc->rd_node.relNode;
|
||||
}
|
||||
|
||||
/*
|
||||
* extract necessary information from index scan node
|
||||
*/
|
||||
|
@ -88,7 +88,10 @@ IndexNext(IndexScanState *node)
|
||||
TupleTableSlot *slot;
|
||||
|
||||
/* set preCacheIndexNode */
|
||||
preCacheIndexNode = node->iss_RelationDesc->rd_node.relNode;
|
||||
if (isPreCacheIndex)
|
||||
{
|
||||
preCacheIndexNode = node->iss_RelationDesc->rd_node.relNode;
|
||||
}
|
||||
|
||||
/*
|
||||
* extract necessary information from index scan node
|
||||
|
@ -4521,7 +4521,10 @@ PostgresMain(int argc, char *argv[], bool PrivateConn,
|
||||
{
|
||||
isPreCacheIndex = true;
|
||||
isPreCacheIndexDone = false;
|
||||
preCacheIndexNode = 0;
|
||||
exec_simple_query(query_string + strlen("precache index "));
|
||||
preCacheIndexNode = 0;
|
||||
isPreCacheIndexDone = false;
|
||||
isPreCacheIndex = false;
|
||||
}
|
||||
else
|
||||
|
8
src/backend/utils/cache/syscache.c
vendored
8
src/backend/utils/cache/syscache.c
vendored
@ -476,13 +476,13 @@ static const struct cachedesc cacheinfo[] = {
|
||||
},
|
||||
4
|
||||
},
|
||||
{HotDataRelationId, /* HOTDATADATNAMERELNAME */
|
||||
HotDataDatnameRelnameIndexId,
|
||||
2,
|
||||
{HotDataRelationId, /* HOTDATADATNAMERELNAMEINDEX */
|
||||
HotDataDatnameRelnameIndexIndexId,
|
||||
3,
|
||||
{
|
||||
Anum_pg_hot_data_datname,
|
||||
Anum_pg_hot_data_relname,
|
||||
0,
|
||||
Anum_pg_hot_data_indexname,
|
||||
0
|
||||
},
|
||||
4
|
||||
|
@ -73,8 +73,8 @@ CATALOG(pg_hot_data,4790,HotDataRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(
|
||||
*/
|
||||
typedef FormData_pg_hot_data *Form_pg_hot_data;
|
||||
|
||||
DECLARE_UNIQUE_INDEX(pg_hot_data_datname_relname_index, 4791, on pg_hot_data using btree(datname name_ops, relname name_ops));
|
||||
#define HotDataDatnameRelnameIndexId 4791
|
||||
DECLARE_UNIQUE_INDEX(pg_hot_data_datname_relname_index_index, 4791, on pg_hot_data using btree(datname name_ops, relname name_ops, indexname name_ops));
|
||||
#define HotDataDatnameRelnameIndexIndexId 4791
|
||||
|
||||
extern void PrecacheHotData();
|
||||
|
||||
|
@ -63,7 +63,7 @@ enum SysCacheIdentifier
|
||||
FOREIGNSERVERNAME,
|
||||
FOREIGNSERVEROID,
|
||||
FOREIGNTABLEREL,
|
||||
HOTDATADATNAMERELNAME,
|
||||
HOTDATADATNAMERELNAMEINDEX,
|
||||
INDEXRELID,
|
||||
LANGNAME,
|
||||
LANGOID,
|
||||
|
Loading…
Reference in New Issue
Block a user