* Initialize the backend-lifespan cache of shippability decisions. */
| 88 | * Initialize the backend-lifespan cache of shippability decisions. |
| 89 | */ |
| 90 | static void |
| 91 | InitializeShippableCache(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 |
no test coverage detected