From 38b29a7593f4c8f1c55432c4e78f8e24cf9597bd Mon Sep 17 00:00:00 2001 From: Marco Slot Date: Thu, 10 Mar 2016 22:10:17 +0100 Subject: [PATCH] Use Row Exclusive Lock on distributed table --- src/backend/distributed/commands/multi_copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));