diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 35dbb87ae3..930cc03ee2 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -3060,7 +3060,10 @@ RelationCacheInvalidate(bool debug_discard) * map doesn't involve any access to relcache entries. */ if (RelationIsMapped(relation)) + { + RelationCloseSmgr(relation); RelationInitPhysicalAddr(relation); + } /* * Add this entry to list of stuff to rebuild in second pass.