mirror of https://github.com/citusdata/citus.git
Fix HTAB memory leaks
parent
c076fb72db
commit
6c73576606
|
@ -1281,7 +1281,8 @@ ErrorIfUnsupportedCascadeObjects(Oid relationId)
|
||||||
info.keysize = sizeof(Oid);
|
info.keysize = sizeof(Oid);
|
||||||
info.entrysize = sizeof(Oid);
|
info.entrysize = sizeof(Oid);
|
||||||
info.hash = oid_hash;
|
info.hash = oid_hash;
|
||||||
uint32 hashFlags = (HASH_ELEM | HASH_FUNCTION);
|
info.hcxt = CurrentMemoryContext;
|
||||||
|
uint32 hashFlags = (HASH_ELEM | HASH_FUNCTION | HASH_CONTEXT);
|
||||||
HTAB *nodeMap = hash_create("object dependency map (oid)", 64, &info, hashFlags);
|
HTAB *nodeMap = hash_create("object dependency map (oid)", 64, &info, hashFlags);
|
||||||
|
|
||||||
bool unsupportedObjectInDepGraph =
|
bool unsupportedObjectInDepGraph =
|
||||||
|
|
|
@ -2099,7 +2099,8 @@ GetDependingViews(Oid relationId)
|
||||||
info.keysize = sizeof(Oid);
|
info.keysize = sizeof(Oid);
|
||||||
info.entrysize = sizeof(ViewDependencyNode);
|
info.entrysize = sizeof(ViewDependencyNode);
|
||||||
info.hash = oid_hash;
|
info.hash = oid_hash;
|
||||||
uint32 hashFlags = (HASH_ELEM | HASH_FUNCTION);
|
info.hcxt = CurrentMemoryContext;
|
||||||
|
uint32 hashFlags = (HASH_ELEM | HASH_FUNCTION | HASH_CONTEXT);
|
||||||
HTAB *nodeMap = hash_create("view dependency map (oid)", 32, &info, hashFlags);
|
HTAB *nodeMap = hash_create("view dependency map (oid)", 32, &info, hashFlags);
|
||||||
|
|
||||||
ViewDependencyNode *tableNode = BuildViewDependencyGraph(relationId, nodeMap);
|
ViewDependencyNode *tableNode = BuildViewDependencyGraph(relationId, nodeMap);
|
||||||
|
|
|
@ -2634,7 +2634,8 @@ ShardPlacementsListToHash(List *shardPlacementList)
|
||||||
info.entrysize = sizeof(ShardPlacement);
|
info.entrysize = sizeof(ShardPlacement);
|
||||||
info.hash = PlacementsHashHashCode;
|
info.hash = PlacementsHashHashCode;
|
||||||
info.match = PlacementsHashCompare;
|
info.match = PlacementsHashCompare;
|
||||||
int hashFlags = (HASH_ELEM | HASH_FUNCTION | HASH_COMPARE);
|
info.hcxt = CurrentMemoryContext;
|
||||||
|
int hashFlags = (HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
|
||||||
|
|
||||||
HTAB *shardPlacementsHash = hash_create("ActivePlacements Hash",
|
HTAB *shardPlacementsHash = hash_create("ActivePlacements Hash",
|
||||||
shardPlacementCount, &info, hashFlags);
|
shardPlacementCount, &info, hashFlags);
|
||||||
|
|
Loading…
Reference in New Issue