MCPcopy Create free account
hub / github.com/apache/cloudberry / InitializeAttoptCache

Function InitializeAttoptCache

src/backend/utils/cache/attoptcache.c:76–96  ·  view source on GitHub ↗

* InitializeAttoptCache * Initialize the attribute options cache. */

Source from the content-addressed store, hash-verified

74 * Initialize the attribute options cache.
75 */
76static void
77InitializeAttoptCache(void)
78{
79 HASHCTL ctl;
80
81 /* Initialize the hash table. */
82 ctl.keysize = sizeof(AttoptCacheKey);
83 ctl.entrysize = sizeof(AttoptCacheEntry);
84 AttoptCacheHash =
85 hash_create("Attopt cache", 256, &ctl,
86 HASH_ELEM | HASH_BLOBS);
87
88 /* Make sure we've initialized CacheMemoryContext. */
89 if (!CacheMemoryContext)
90 CreateCacheMemoryContext();
91
92 /* Watch for invalidation events. */
93 CacheRegisterSyscacheCallback(ATTNUM,
94 InvalidateAttoptCacheCallback,
95 (Datum) 0);
96}
97
98/*
99 * get_attribute_options

Callers 1

get_attribute_optionsFunction · 0.85

Calls 3

hash_createFunction · 0.85
CreateCacheMemoryContextFunction · 0.85

Tested by

no test coverage detected