--- src/context/pool_query_context.c | 5 +---- src/main/pgpool_main.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/context/pool_query_context.c b/src/context/pool_query_context.c index 4791098..2c91762 100644 --- a/src/context/pool_query_context.c +++ b/src/context/pool_query_context.c @@ -481,10 +481,7 @@ pool_where_to_send(POOL_QUERY_CONTEXT * query_context, char *query, Node *node) * be able to understand all part of multi statement queries, but * until that day we need this band aid. */ - if (query_context->is_multi_statement) - { - pool_set_node_to_be_sent(query_context, PRIMARY_NODE_ID); - } + pool_set_node_to_be_sent(query_context, PRIMARY_NODE_ID); } else if (MASTER_SLAVE) { diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index 0fe558b..1e085ae 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -2027,16 +2027,14 @@ failover(void) sts = waitpid(pcp_pid, &status, 0); if (sts != -1) break; - if (sts == -1) + + if (errno == EINTR) + continue; + else { - if (errno == EINTR) - continue; - else - { - ereport(WARNING, - (errmsg("failover: waitpid failed. reason: %s", strerror(errno)))); - continue; - } + ereport(WARNING, + (errmsg("failover: waitpid failed. reason: %s", strerror(errno)))); + continue; } } if (WIFSIGNALED(status)) --