From a1bfb4f31bc7c727cedaa654cb8202aa4e4acfe1 Mon Sep 17 00:00:00 2001 From: Sait Talha Nisanci Date: Wed, 18 Aug 2021 17:02:15 +0300 Subject: [PATCH] Fix unlimited copy size variable's value --- src/backend/distributed/commands/transmit.c | 2 +- src/include/distributed/version_compat.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/commands/transmit.c b/src/backend/distributed/commands/transmit.c index 8ce727017..be6f56d0d 100644 --- a/src/backend/distributed/commands/transmit.c +++ b/src/backend/distributed/commands/transmit.c @@ -245,7 +245,7 @@ static bool ReceiveCopyData(StringInfo copyData) { bool copyDone = true; - const int unlimitedSize = 0; + const int unlimitedSize = PQ_LARGE_MESSAGE_LIMIT; HOLD_CANCEL_INTERRUPTS(); pq_startmsgread(); diff --git a/src/include/distributed/version_compat.h b/src/include/distributed/version_compat.h index 960ef8eef..fba6cfe99 100644 --- a/src/include/distributed/version_compat.h +++ b/src/include/distributed/version_compat.h @@ -93,6 +93,7 @@ ((&ProcGlobal->allPgXact[(pgproc)->pgprocno])->vacuumFlags) #define get_partition_parent_compat(a, b) get_partition_parent(a) #define RelationGetPartitionDesc_compat(a, b) RelationGetPartitionDesc(a) +#define PQ_LARGE_MESSAGE_LIMIT 0 #endif #if PG_VERSION_NUM >= PG_VERSION_13