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

Function InitializeShippableCache

contrib/postgres_fdw/shippable.c:90–105  ·  view source on GitHub ↗

* Initialize the backend-lifespan cache of shippability decisions. */

Source from the content-addressed store, hash-verified

88 * Initialize the backend-lifespan cache of shippability decisions.
89 */
90static void
91InitializeShippableCache(void)
92{
93 HASHCTL ctl;
94
95 /* Create the hash table. */
96 ctl.keysize = sizeof(ShippableCacheKey);
97 ctl.entrysize = sizeof(ShippableCacheEntry);
98 ShippableCacheHash =
99 hash_create("Shippability cache", 256, &ctl, HASH_ELEM | HASH_BLOBS);
100
101 /* Set up invalidation callback on pg_foreign_server. */
102 CacheRegisterSyscacheCallback(FOREIGNSERVEROID,
103 InvalidateShippableCacheCallback,
104 (Datum) 0);
105}
106
107/*
108 * Returns true if given object (operator/function/type) is shippable

Callers 1

is_shippableFunction · 0.85

Calls 2

hash_createFunction · 0.85

Tested by

no test coverage detected