mirror of https://github.com/citusdata/citus.git
Don't modify cache entry in RelationShardListForShardCreate()
parent
70434bc716
commit
91d8a41ecd
|
@ -728,11 +728,15 @@ RelationShardListForShardCreate(ShardInterval *shardInterval)
|
||||||
DistTableCacheEntry *cacheEntry = DistributedTableCacheEntry(relationId);
|
DistTableCacheEntry *cacheEntry = DistributedTableCacheEntry(relationId);
|
||||||
List *referencedRelationList = cacheEntry->referencedRelationsViaForeignKey;
|
List *referencedRelationList = cacheEntry->referencedRelationsViaForeignKey;
|
||||||
List *referencingRelationList = cacheEntry->referencingRelationsViaForeignKey;
|
List *referencingRelationList = cacheEntry->referencingRelationsViaForeignKey;
|
||||||
List *allForeignKeyRelations =
|
List *allForeignKeyRelations = NIL;
|
||||||
list_concat_unique_oid(referencedRelationList, referencingRelationList);
|
|
||||||
int shardIndex = -1;
|
int shardIndex = -1;
|
||||||
ListCell *fkeyRelationIdCell = NULL;
|
ListCell *fkeyRelationIdCell = NULL;
|
||||||
|
|
||||||
|
/* list_concat_*() modifies the first arg, so make a copy first */
|
||||||
|
allForeignKeyRelations = list_copy(referencedRelationList);
|
||||||
|
allForeignKeyRelations = list_concat_unique_oid(allForeignKeyRelations,
|
||||||
|
referencingRelationList);
|
||||||
|
|
||||||
/* record the placement access of the shard itself */
|
/* record the placement access of the shard itself */
|
||||||
relationShard = CitusMakeNode(RelationShard);
|
relationShard = CitusMakeNode(RelationShard);
|
||||||
relationShard->relationId = relationId;
|
relationShard->relationId = relationId;
|
||||||
|
|
Loading…
Reference in New Issue