From 9747961c04d99823896fdcf67ba1ea985da5b98e Mon Sep 17 00:00:00 2001 From: Marco Slot Date: Fri, 10 Sep 2021 14:20:43 +0200 Subject: [PATCH] Small fix to PG12 compatibility --- src/backend/distributed/worker/worker_merge_protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/distributed/worker/worker_merge_protocol.c b/src/backend/distributed/worker/worker_merge_protocol.c index 0a2a590a4..b60a250a9 100644 --- a/src/backend/distributed/worker/worker_merge_protocol.c +++ b/src/backend/distributed/worker/worker_merge_protocol.c @@ -620,10 +620,11 @@ CopyTaskFilesFromDirectory(StringInfo schemaName, StringInfo relationName, parseState->p_sourcetext = queryString; Relation relation = heap_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,