Patch contributed by Hou, Zhijie.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2020-September/003805.html
* 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)
{
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))