diff --git a/src/backend/distributed/worker/worker_merge_protocol.c b/src/backend/distributed/worker/worker_merge_protocol.c index 4a794085d..847c5a7ff 100644 --- a/src/backend/distributed/worker/worker_merge_protocol.c +++ b/src/backend/distributed/worker/worker_merge_protocol.c @@ -577,10 +577,11 @@ CopyTaskFilesFromDirectory(StringInfo schemaName, StringInfo relationName, parseState->p_sourcetext = queryString; Relation relation = table_openrv(rangeVar, RowExclusiveLock); + (void) addRangeTableEntryForRelation(parseState, relation, #if PG_VERSION_NUM >= PG_VERSION_12 - (void) addRangeTableEntryForRelation(parseState, relation, RowExclusiveLock, - NULL, false, false); + RowExclusiveLock, #endif + NULL, false, false); CopyState copyState = BeginCopyFrom(parseState, relation,