From f0693e2f75a08ae1376d7a3e5e21d45c12317954 Mon Sep 17 00:00:00 2001 From: citus bot Date: Fri, 3 Jul 2020 10:45:00 +0200 Subject: [PATCH] Remove unused MaxMasterConnectionCount function --- .../distributed/executor/multi_server_executor.c | 15 --------------- src/include/distributed/multi_server_executor.h | 1 - 2 files changed, 16 deletions(-) diff --git a/src/backend/distributed/executor/multi_server_executor.c b/src/backend/distributed/executor/multi_server_executor.c index a13c39ca3..52b4ba1da 100644 --- a/src/backend/distributed/executor/multi_server_executor.c +++ b/src/backend/distributed/executor/multi_server_executor.c @@ -162,21 +162,6 @@ HasReplicatedDistributedTable(List *relationOids) } -/* - * MaxMasterConnectionCount returns the number of connections a master can open. - * A master cannot create more than a certain number of file descriptors (FDs). - * Every task requires 2 FDs, one file and one connection. Some FDs are taken by - * the VFD pool and there is currently no way to reclaim these before opening a - * connection. We therefore assume some FDs to be reserved for VFDs, based on - * observing a typical size of the pool on a Citus master. - */ -int -MaxMasterConnectionCount(void) -{ - return Max((max_files_per_process - RESERVED_FD_COUNT) / 2, 1); -} - - /* * RemoveJobDirectory gets automatically called at portal drop (end of query) or * at transaction abort. The function removes the job directory and releases the diff --git a/src/include/distributed/multi_server_executor.h b/src/include/distributed/multi_server_executor.h index d7b848a41..fc46747a5 100644 --- a/src/include/distributed/multi_server_executor.h +++ b/src/include/distributed/multi_server_executor.h @@ -186,7 +186,6 @@ extern void CleanupTaskExecution(TaskExecution *taskExecution); extern void ErrorSizeLimitIsExceeded(void); extern bool TaskExecutionFailed(TaskExecution *taskExecution); extern void AdjustStateForFailure(TaskExecution *taskExecution); -extern int MaxMasterConnectionCount(void); extern TupleTableSlot * TaskTrackerExecScan(CustomScanState *node);