File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,15 @@ type_cache_syshash(const void *key, Size keysize)
351
351
* invalid. Note however that we may fail to find one or more of the
352
352
* values requested by 'flags'; the caller needs to check whether the fields
353
353
* are InvalidOid or not.
354
+ *
355
+ * Note that while filling TypeCacheEntry we might process concurrent
356
+ * invalidation messages, causing our not-yet-filled TypeCacheEntry to be
357
+ * invalidated. In this case, we typically only clear flags while values are
358
+ * still available for the caller. It's expected that the caller holds
359
+ * enough locks on type-depending objects that the values are still relevant.
360
+ * It's also important that the tupdesc is filled after all other
361
+ * TypeCacheEntry items for TYPTYPE_COMPOSITE. So, tupdesc can't get
362
+ * invalidated during the lookup_type_cache() call.
354
363
*/
355
364
TypeCacheEntry *
356
365
lookup_type_cache (Oid type_id , int flags )
You can’t perform that action at this time.
0 commit comments