更合适的动态线程名
This commit is contained in:
@ -1245,6 +1245,8 @@ void exec_simple_plan(PlannedStmt* plan)
|
||||
*/
|
||||
commandTag = CreateCommandTagForPlan(plan->commandType);
|
||||
|
||||
knl_thread_set_name(commandTag, true);
|
||||
|
||||
set_ps_display(commandTag, false);
|
||||
|
||||
BeginCommand(commandTag, dest);
|
||||
@ -2158,6 +2160,8 @@ void exec_simple_query(const char* query_string, MessageType messageType, String
|
||||
*/
|
||||
commandTag = CreateCommandTag(parsetree);
|
||||
|
||||
knl_thread_set_name(commandTag, true);
|
||||
|
||||
set_ps_display(commandTag, false);
|
||||
|
||||
BeginCommand(commandTag, dest);
|
||||
@ -2804,6 +2808,8 @@ static void exec_plan_with_params(StringInfo input_message)
|
||||
|
||||
commandTag = "SELECT";
|
||||
|
||||
knl_thread_set_name(commandTag, true);
|
||||
|
||||
set_ps_display(commandTag, false);
|
||||
|
||||
BeginCommand(commandTag, dest);
|
||||
@ -4447,6 +4453,8 @@ void exec_execute_message(const char* portal_name, long max_rows)
|
||||
|
||||
pgstat_report_activity(STATE_RUNNING, sourceText);
|
||||
|
||||
knl_thread_set_name(portal->commandTag, true);
|
||||
|
||||
set_ps_display(portal->commandTag, false);
|
||||
|
||||
if (save_log_statement_stats)
|
||||
@ -6374,6 +6382,8 @@ static void execute_stream_plan(StreamProducer* producer)
|
||||
// we should remove this hard coding and get the tag automatically
|
||||
commandTag = "SELECT";
|
||||
|
||||
knl_thread_set_name(commandTag, true);
|
||||
|
||||
set_ps_display(commandTag, false);
|
||||
|
||||
BeginCommand(commandTag, dest);
|
||||
@ -9453,6 +9463,8 @@ void exec_query_for_merge(const char* query_string)
|
||||
*/
|
||||
commandTag = CreateCommandTag(parsetree);
|
||||
|
||||
knl_thread_set_name(commandTag, true);
|
||||
|
||||
set_ps_display(commandTag, false);
|
||||
|
||||
BeginCommand(commandTag, dest);
|
||||
@ -10279,6 +10291,8 @@ static void exec_batch_bind_execute(StringInfo input_message)
|
||||
t_thrd.postgres_cxt.debug_query_string = psrc->query_string;
|
||||
pgstat_report_activity(STATE_RUNNING, psrc->query_string);
|
||||
|
||||
knl_thread_set_name(psrc->commandTag, true);
|
||||
|
||||
set_ps_display(psrc->commandTag, false);
|
||||
|
||||
if (save_log_statement_stats) {
|
||||
|
||||
Reference in New Issue
Block a user