src/context/pool_query_context.c | 4 +++- src/protocol/pool_proto_modules.c | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/context/pool_query_context.c b/src/context/pool_query_context.c index a75ea74..b66a5e1 100644 --- a/src/context/pool_query_context.c +++ b/src/context/pool_query_context.c @@ -977,7 +977,7 @@ pool_extended_send_and_wait(POOL_QUERY_CONTEXT * query_context, char msgbuf[QUERY_STRING_BUFFER_LEN]; char *stmt; - if (*kind == 'P' || *kind == 'E') + if (*kind == 'P' || *kind == 'E' || *kind == 'B') { if (query_context->rewritten_query) { @@ -1000,6 +1000,8 @@ pool_extended_send_and_wait(POOL_QUERY_CONTEXT * query_context, if (*kind == 'P') snprintf(msgbuf, sizeof(msgbuf), "Parse: %s", stmt); + else if (*kind == 'B') + snprintf(msgbuf, sizeof(msgbuf), "Bind: %s", stmt); else snprintf(msgbuf, sizeof(msgbuf), "Execute: %s", stmt); } diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c index fb8941e..7bfbde4 100644 --- a/src/protocol/pool_proto_modules.c +++ b/src/protocol/pool_proto_modules.c @@ -792,6 +792,10 @@ Execute(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend, pool_is_writing_transaction(), TSTATE(backend, MASTER_SLAVE ? PRIMARY_NODE_ID : REAL_MASTER_NODE_ID)))); + /* log query to log file if necessary */ + if (pool_config->log_statement) + ereport(LOG, (errmsg("statement: %s", query))); + /* * Fetch memory cache if possible */ @@ -889,7 +893,6 @@ Execute(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend, #ifdef DEBUG extern bool stop_now; #endif - pool_ps_idle_display(backend); pool_stats_count_up_num_cache_hits(); query_context->skip_cache_commit = true; #ifdef DEBUG @@ -908,6 +911,9 @@ Execute(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend, query_context->skip_cache_commit = false; } + /* show ps status */ + query_ps_status(query, backend); + session_context->query_context = query_context; /*