1 /*------------------------------------------------------------------------- 2 * 3 * multi_server_executor.h 4 * Type and function declarations for executing remote jobs from a backend; 5 * the ensemble of these jobs form the distributed execution plan. 6 * 7 * Copyright (c) Citus Data, Inc. 8 * 9 * $Id$ 10 * 11 *------------------------------------------------------------------------- 12 */ 13 14 #ifndef MULTI_SERVER_EXECUTOR_H 15 #define MULTI_SERVER_EXECUTOR_H 16 17 #include "distributed/multi_physical_planner.h" 18 #include "distributed/worker_manager.h" 19 20 /* Adaptive executor repartioning related defines */ 21 #define WORKER_CREATE_SCHEMA_QUERY "SELECT worker_create_schema (" UINT64_FORMAT ", %s);" 22 #define WORKER_REPARTITION_CLEANUP_QUERY "SELECT worker_repartition_cleanup (" \ 23 UINT64_FORMAT \ 24 ");" 25 26 27 /* Enumeration that represents distributed executor types */ 28 typedef enum 29 { 30 MULTI_EXECUTOR_INVALID_FIRST = 0, 31 MULTI_EXECUTOR_ADAPTIVE = 1, 32 MULTI_EXECUTOR_NON_PUSHABLE_INSERT_SELECT = 2 33 } MultiExecutorType; 34 35 36 /* Config variable managed via guc.c */ 37 extern int RemoteTaskCheckInterval; 38 extern int TaskExecutorType; 39 extern bool EnableRepartitionJoins; 40 extern int MultiTaskQueryLogLevel; 41 42 43 /* Function declarations common to more than one executor */ 44 extern MultiExecutorType JobExecutorType(DistributedPlan *distributedPlan); 45 46 #endif /* MULTI_SERVER_EXECUTOR_H */ 47