Yet another reset query stuck problem fix. [pgpool-general: 4265]
authorMuhammad Usama <m.usama@gmail.com>
Mon, 22 Feb 2016 12:23:46 +0000 (17:23 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Mon, 22 Feb 2016 12:25:19 +0000 (17:25 +0500)
The solution is to return  POOL_END_WITH_FRONTEND_ERROR instead of
POOL_END when pool_flush on front-end socket fails

pool_process_query.c

index 91ced8b10b1261d64ba1842b9db33601cb29fab5..781db62f3202b7e82085de38165d53787a2affa1 100644 (file)
@@ -824,7 +824,7 @@ POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *
                                if (pool_flush_it(frontend) < 0)
                                {
                                        pool_error("wait_for_query_response: frontend error occured while waiting for backend reply");
-                                       return POOL_END;
+                                       return POOL_END_WITH_FRONTEND_ERROR;
                                }
 
                        } else          /* Protocol version 2 */
@@ -845,7 +845,7 @@ POOL_STATUS wait_for_query_response(POOL_CONNECTION *frontend, POOL_CONNECTION *
                                if (pool_flush_it(frontend) < 0)
                                {
                                        pool_error("wait_for_query_response: frontend error occured while waiting for backend reply");
-                                       return POOL_END;
+                                       return POOL_END_WITH_FRONTEND_ERROR;
                                }
 #endif
                        }