Skip to content

Commit

Permalink
Fix check-vanilla test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
emelsimsek committed Aug 24, 2023
1 parent e700e1d commit 993599a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/backend/distributed/metadata/metadata_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -4781,6 +4781,20 @@ InvalidateDistRelationCacheCallback(Datum argument, Oid relationId)
InvalidateCitusTableCacheEntrySlot(cacheSlot);
}

/*
* if pg_dist_* table relcache entries got invalidated due to direct operations on
* them, invalidate the cached oids.
* TODO: We should probably invalidate the other cached oids when related tables
* got invalidated.
*/

if (relationId == MetadataCache.distPartitionRelationId)
{
MetadataCache.distPartitionRelationId = InvalidOid;
MetadataCache.distPartitionLogicalRelidIndexId = InvalidOid;
MetadataCache.distPartitionColocationidIndexId = InvalidOid;
}

if (relationId == MetadataCache.distObjectRelationId)
{
InvalidateDistObjectCache();
Expand Down

0 comments on commit 993599a

Please sign in to comment.