diff --git a/src/common/interfaces/libpq/jdbc/client_logic_jni/Makefile b/src/common/interfaces/libpq/jdbc/client_logic_jni/Makefile index 51452741c..43821512c 100644 --- a/src/common/interfaces/libpq/jdbc/client_logic_jni/Makefile +++ b/src/common/interfaces/libpq/jdbc/client_logic_jni/Makefile @@ -35,8 +35,8 @@ OBJS = $(CPP_SRCS:.cpp=.o) all: libgauss_cl_jni.so +# Makefile.shlib has declare target: libgauss_cl_jni.so libgauss_cl_jni.so: $(OBJS) - $(CC) -fPIC -shared $(CPPFLAGS) $^ $(LDFLAGS) $(LDLIBS) -o $@ install: all installdirs $(INSTALL_DATA) libgauss_cl_jni.so$(X) '$(DESTDIR)$(bindir)/../lib/libgauss_cl_jni.so$(X)' diff --git a/src/gausskernel/runtime/executor/execMain.cpp b/src/gausskernel/runtime/executor/execMain.cpp index 47c784bde..850a39fad 100755 --- a/src/gausskernel/runtime/executor/execMain.cpp +++ b/src/gausskernel/runtime/executor/execMain.cpp @@ -1429,26 +1429,30 @@ void InitPlan(QueryDesc *queryDesc, int eflags) estate->dataDestRelIndex = plannedstmt->dataDestRelIndex; } + /* deprecated: explain_info_hashtbl/collected_info_hashtbl + * set false disable data insertion into the hash table. + * deprecated function: + * - pg_stat_get_wlm_realtime_operator_info + * - pg_stat_get_wlm_realtime_ec_operator_info + * - pg_stat_get_wlm_ec_operator_info + * - gs_stat_get_wlm_plan_operator_info + * - pg_stat_get_wlm_operator_info + * */ estate->es_can_realtime_statistics = false; estate->es_can_history_statistics = false; if (u_sess->attr.attr_resource.use_workload_manager && u_sess->attr.attr_resource.resource_track_level == RESOURCE_TRACK_OPERATOR && !IsInitdb) { - int max_plan_id = plannedstmt->num_plannodes; int current_realtime_num = hash_get_num_entries(g_operator_table.explain_info_hashtbl); - if (current_realtime_num + max_plan_id < g_operator_table.max_realtime_num) { - /* too many collect info now, ignore this time. */ - estate->es_can_realtime_statistics = true; - } else { + if (current_realtime_num != 0) { + /* unreached branch */ ereport(LOG, (errmsg("Too many realtime info in the memory, current realtime record num is %d.", - current_realtime_num))); + current_realtime_num))); } int current_collectinfo_num = hash_get_num_entries(g_operator_table.collected_info_hashtbl); - if (current_collectinfo_num + max_plan_id <= g_operator_table.max_collectinfo_num) { - /* too many collect info now, ignore this time. */ - estate->es_can_history_statistics = true; - } else { + if (current_collectinfo_num != 0) { + /* unreached branch */ ereport(LOG, (errmsg("Too many history info in the memory, current history record num is %d.", current_collectinfo_num))); } diff --git a/src/gausskernel/runtime/executor/instrument.cpp b/src/gausskernel/runtime/executor/instrument.cpp index 8ea1e90fb..b36da82b7 100644 --- a/src/gausskernel/runtime/executor/instrument.cpp +++ b/src/gausskernel/runtime/executor/instrument.cpp @@ -3156,12 +3156,6 @@ void InitOperStatProfile(void) &hash_ctl1, HASH_ELEM | HASH_SHRCTX | HASH_FUNCTION | HASH_COMPARE | HASH_PARTITION); - const int max_work_mem = 10 * MBYTES; // 10MB - const int detail_mem = 20 * MBYTES; - - g_operator_table.max_realtime_num = max_work_mem / sizeof(ExplainDNodeInfo); - g_operator_table.max_collectinfo_num = detail_mem / sizeof(ExplainDNodeInfo); - MemoryContextSwitchTo(old_context); } diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h index 69da0ccd9..098541a79 100644 --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@ -901,9 +901,6 @@ typedef struct Qpid { } Qpid; typedef struct OperatorProfileTable { - int max_realtime_num; /* max session info num in the hash table */ - int max_collectinfo_num; /* max collect info num in list */ - HTAB* explain_info_hashtbl; /* collect information hash table */ HTAB* collected_info_hashtbl; /* collect information hash table */ } OperatorProfileTable;