mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 00:46:29 +00:00
standby switchover: improve logging of repmgrd pause actions
- state how many nodes are to be operated on - if errors were encountered with any nodes, emit the total number of nodes as well as the number of affected nodes - log nodes where repmgrd was not running anyway as NOTICE, not WARNING
This commit is contained in:
@@ -4776,6 +4776,7 @@ do_standby_switchover(void)
|
|||||||
|
|
||||||
repmgrd_info = (RepmgrdInfo **) pg_malloc0(sizeof(RepmgrdInfo *) * all_nodes.node_count);
|
repmgrd_info = (RepmgrdInfo **) pg_malloc0(sizeof(RepmgrdInfo *) * all_nodes.node_count);
|
||||||
|
|
||||||
|
log_notice(_("attempting to pause repmgrd on %i nodes"), all_nodes.node_count);
|
||||||
for (cell = all_nodes.head; cell; cell = cell->next)
|
for (cell = all_nodes.head; cell; cell = cell->next)
|
||||||
{
|
{
|
||||||
repmgrd_info[i] = pg_malloc0(sizeof(RepmgrdInfo));
|
repmgrd_info[i] = pg_malloc0(sizeof(RepmgrdInfo));
|
||||||
@@ -4835,8 +4836,9 @@ do_standby_switchover(void)
|
|||||||
|
|
||||||
initPQExpBuffer(&msg);
|
initPQExpBuffer(&msg);
|
||||||
appendPQExpBuffer(&msg,
|
appendPQExpBuffer(&msg,
|
||||||
_("unable to connect to %i node(s), unable to pause all repmgrd instances"),
|
_("unable to connect to %i of %i node(s), unable to pause all repmgrd instances"),
|
||||||
unreachable_node_count);
|
unreachable_node_count,
|
||||||
|
all_nodes.node_count);
|
||||||
|
|
||||||
initPQExpBuffer(&detail);
|
initPQExpBuffer(&detail);
|
||||||
|
|
||||||
@@ -4900,7 +4902,7 @@ do_standby_switchover(void)
|
|||||||
*/
|
*/
|
||||||
if (repmgrd_info[i]->running == false)
|
if (repmgrd_info[i]->running == false)
|
||||||
{
|
{
|
||||||
log_warning(_("repmgrd not running on node \"%s\" (ID: %i)"),
|
log_notice(_("repmgrd not running on node \"%s\" (ID: %i), not pausing"),
|
||||||
cell->node_info->node_name,
|
cell->node_info->node_name,
|
||||||
cell->node_info->node_id);
|
cell->node_info->node_id);
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
Reference in New Issue
Block a user