diff --git a/src/backend/distributed/commands/multi_copy.c b/src/backend/distributed/commands/multi_copy.c index c1c05d4d0..9267306ef 100644 --- a/src/backend/distributed/commands/multi_copy.c +++ b/src/backend/distributed/commands/multi_copy.c @@ -333,7 +333,7 @@ CitusCopyFrom(CopyStmt *copyStatement, char *completionTag) compareFunction = ShardIntervalCompareFunction(partitionColumn, partitionMethod); /* allocate column values and nulls arrays */ - rel = heap_open(tableId, AccessShareLock); + rel = heap_open(tableId, RowExclusiveLock); tupleDescriptor = RelationGetDescr(rel); columnCount = tupleDescriptor->natts; columnValues = palloc0(columnCount * sizeof(Datum));