diff --git a/HISTORY b/HISTORY
index 9d6efa31..876573df 100644
--- a/HISTORY
+++ b/HISTORY
@@ -14,6 +14,7 @@
it will actually be possible to stream from the target node (Ian)
repmgr: "standby switchover": improve handling of connection URIs when
executing "node rejoin" on the demotion candidate; GitHub #525 (Ian)
+ repmgr: fix long node ID display in "cluster show"; (Ian)
repmgrd: check binary and extension major versions match; GitHub #515 (Ian)
repmgrd: on a cascaded standby, don't fail over if "failover=manual";
GitHub #531 (Ian)
diff --git a/doc/appendix-release-notes.sgml b/doc/appendix-release-notes.sgml
index 6c2573c5..ba5547e5 100644
--- a/doc/appendix-release-notes.sgml
+++ b/doc/appendix-release-notes.sgml
@@ -155,11 +155,18 @@ REPMGRD_OPTS="--daemonize=false"
- repmgrd: on a cascaded standby, don't fail over if
+ repmgrd: on a cascaded standby, don't fail over if
failover=manual. GitHub #531.
+
+
+ repmgr cluster show:
+ fix display of node IDs with multiple digits.
+
+
+
diff --git a/repmgr-action-cluster.c b/repmgr-action-cluster.c
index b2011306..48d5f39e 100644
--- a/repmgr-action-cluster.c
+++ b/repmgr-action-cluster.c
@@ -137,6 +137,7 @@ do_cluster_show(void)
for (cell = nodes.head; cell; cell = cell->next)
{
PQExpBufferData details;
+ PQExpBufferData node_id;
cell->node_info->conn = establish_db_connection_quiet(cell->node_info->conninfo);
@@ -352,6 +353,11 @@ do_cluster_show(void)
PQfinish(cell->node_info->conn);
cell->node_info->conn = NULL;
+ initPQExpBuffer(&node_id);
+ appendPQExpBuffer(&node_id, "%i", cell->node_info->node_id);
+ headers_show[SHOW_ID].cur_length = strlen(node_id.data);
+ termPQExpBuffer(&node_id);
+
headers_show[SHOW_ROLE].cur_length = strlen(get_node_type_string(cell->node_info->type));
headers_show[SHOW_NAME].cur_length = strlen(cell->node_info->node_name);
headers_show[SHOW_STATUS].cur_length = strlen(cell->node_info->details);