if (root && root->type == json_object)
{
- json_get_int_value_for_key(root, "FailoverFuncState", &failoverState);
+ if (json_get_int_value_for_key(root, "FailoverFuncState", &failoverState))
+ {
+ ereport(LOG,
+ (errmsg("unable to process failover indication"),
+ errdetail("failed to get failover state from json data in command packet")));
+ res = FAILOVER_RES_INVALID_FUNCTION;
+ }
+
}
else
{
cleanUpIPCCommand(ipcCommand);
}
+
+ list_free(ipcCommands_to_del);
}
g_cluster.clusterCommands = list_delete_ptr(g_cluster.clusterCommands, clusterCommand);
MemoryContextDelete(clusterCommand->memoryContext);
}
+
+ list_free(finishedCommands);
}
/* remove the unreachable nodes from cluster */
g_cluster.clusterCommands = list_delete_ptr(g_cluster.clusterCommands, clusterCommand);
MemoryContextDelete(clusterCommand->memoryContext);
}
+
+ list_free(finishedCommands);
}
if (nodeResult == NULL)
{
/* should never hapen */
+ ereport(WARNING,
+ (errmsg("Internal error. Not able to locate node result slot")));
+ MemoryContextDelete(clusterCommand->memoryContext);
return -1;
}
if (send_message_to_node(nodeResult->wdNode, pkt) == false)
ereport(DEBUG1,
(errmsg("IP = %s", ip ? ip : "NULL")));
}
+
+ list_free_deep(local_addresses);
+ local_addresses = NULL;
}
}
*/
wd_IP_up();
}
- list_free_deep(local_addresses);
- local_addresses = NULL;
}
+ list_free_deep(local_addresses);
+ local_addresses = NULL;
}
}
break;
{
g_cluster.wd_timer_commands = list_delete_ptr(g_cluster.wd_timer_commands, lfirst(lc));
}
+
+ list_free(timers_to_del);
}
static void
thread_arg[i].lifeCheckNode = node;
thread_arg[i].password = password;
rc = watchdog_thread_create(&thread[i], &attr, thread_ping_pgpool, (void *) &thread_arg[i]);
+ if (rc)
+ {
+ ereport(WARNING,
+ (errmsg("failed to create thread for checking pgpool status by query for %d (%s:%d)",
+ i, node->hostName, node->pgpoolPort),
+ errdetail("pthread_create failed with error code %d: %s",rc, strerror(rc))));
+ }
}
pthread_attr_destroy(&attr);