Skip to content
Browse files

Add logging by per_node_statement().

  • Loading branch information...
1 parent 735322e commit b23c062234ff5c56e65a1d3ca990825d8f7b8077 t-ishii committed
Showing with 11 additions and 1 deletion.
  1. +11 −1 pool_process_query.c
View
12 pool_process_query.c
@@ -1,6 +1,6 @@
/* -*-pgsql-c-*- */
/*
- * $Header: /cvsroot/pgpool/pgpool-II/pool_process_query.c,v 1.174 2009/11/15 08:27:35 t-ishii Exp $
+ * $Header: /cvsroot/pgpool/pgpool-II/pool_process_query.c,v 1.175 2009/11/29 08:42:18 t-ishii Exp $
*
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
@@ -1912,6 +1912,11 @@ POOL_STATUS SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend, POOL_CO
{
if (VALID_BACKEND(i))
{
+ char msgbuf[128];
+
+ snprintf(msgbuf, sizeof(msgbuf), "%c message", kind);
+ per_node_statement_log(backend, i, msgbuf);
+
if (pool_write(CONNECTION(backend, i), &kind, 1))
return POOL_END;
if (pool_write(CONNECTION(backend,i), &sendlen, sizeof(sendlen)))
@@ -1961,6 +1966,11 @@ POOL_STATUS SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend, POOL_CO
{
if (VALID_BACKEND(i))
{
+ char msgbuf[128];
+
+ snprintf(msgbuf, sizeof(msgbuf), "%c message", kind);
+ per_node_statement_log(backend, i, msgbuf);
+
if (pool_write(CONNECTION(backend, i), &kind, 1))
{
free(rewrite_msg);

0 comments on commit b23c062

Please sign in to comment.
Something went wrong with that request. Please try again.