Skip to content

Commit 5e495de

Browse files
committed
Comment use of hash vis-a-vis cache invalidation
1 parent ed33e74 commit 5e495de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/postgres_fdw/shippable.c

+5
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ is_shippable(Oid objnumber, Oid classnumber, List *extension_list)
188188
*/
189189
bool shippable = lookup_shippable(objnumber, classnumber, extension_list);
190190

191+
/*
192+
* Don't create a new hash entry until *after* we have the shippable
193+
* result in hand, as the shippable lookup might trigger a cache
194+
* invalidation.
195+
*/
191196
entry = (ShippableCacheEntry *)
192197
hash_search(ShippableCacheHash,
193198
(void *) &key,

0 commit comments

Comments
 (0)