Get shard resource locks for only DMLs

pull/1895/head
metdos 2017-12-21 12:53:48 +02:00
parent a9cf0c3e66
commit 32b7e152a3
1 changed files with 9 additions and 2 deletions

View File

@ -1063,8 +1063,15 @@ ExecuteModifyTasks(List *taskList, bool expectResults, ParamListInfo paramListIn
LockPartitionRelations(firstShardInterval->relationId, RowExclusiveLock); LockPartitionRelations(firstShardInterval->relationId, RowExclusiveLock);
} }
/* ensure that there are no concurrent modifications on the same shards */ /*
* Ensure that there are no concurrent modifications on the same
* shards. For DDL commands, we already obtained the appropriate
* locks in ProcessUtility.
*/
if (firstTask->taskType == MODIFY_TASK)
{
AcquireExecutorMultiShardLocks(taskList); AcquireExecutorMultiShardLocks(taskList);
}
BeginOrContinueCoordinatedTransaction(); BeginOrContinueCoordinatedTransaction();