Fix RLS and replica identity propagation on shard move

pull/4215/head
Marco Slot 2020-10-01 18:04:55 +02:00
parent bce11514b9
commit 4f69298d90
2 changed files with 4 additions and 4 deletions

View File

@ -562,9 +562,6 @@ GetTableConstructionCommands(Oid relationId)
List *replicaIdentityEvents = GetTableReplicaIdentityCommand(relationId);
tableDDLEventList = list_concat(tableDDLEventList, replicaIdentityEvents);
List *policyCommands = CreatePolicyCommands(relationId);
tableDDLEventList = list_concat(tableDDLEventList, policyCommands);
List *triggerCommands = GetExplicitTriggerCommandList(relationId);
tableDDLEventList = list_concat(tableDDLEventList, triggerCommands);
@ -670,6 +667,9 @@ GetTableBuildingCommands(Oid relationId, bool includeSequenceDefaults)
tableDDLEventList = lappend(tableDDLEventList, tableOwnerDef);
}
List *policyCommands = CreatePolicyCommands(relationId);
tableDDLEventList = list_concat(tableDDLEventList, policyCommands);
/* revert back to original search_path */
PopOverrideSearchPath();

View File

@ -775,7 +775,7 @@ CopyShardCommandList(ShardInterval *shardInterval, const char *sourceNodeName,
copyShardDataCommand->data);
}
List *indexCommandList = GetTableIndexAndConstraintCommands(relationId);
List *indexCommandList = GetTableConstructionCommands(relationId);
indexCommandList = WorkerApplyShardDDLCommandList(indexCommandList, shardId);
copyShardToNodeCommandsList = list_concat(copyShardToNodeCommandsList,