cluster show: correct timeline column length calculation

Unlikely to have made a difference unless abnormally long priority
or timeline values exist.
This commit is contained in:
Ian Barwick
2020-02-25 09:55:41 +09:00
parent f5124a7750
commit 11ddb08911

View File

@@ -247,13 +247,13 @@ do_cluster_show(void)
if (cell->node_info->replication_info->timeline_id == UNKNOWN_TIMELINE_ID)
{
/* display "?" */
headers_show[SHOW_PRIORITY].cur_length = 1;
headers_show[SHOW_TIMELINE_ID].cur_length = 1;
}
else
{
initPQExpBuffer(&buf);
appendPQExpBuffer(&buf, "%i", cell->node_info->replication_info->timeline_id);
headers_show[SHOW_PRIORITY].cur_length = strlen(buf.data);
headers_show[SHOW_TIMELINE_ID].cur_length = strlen(buf.data);
termPQExpBuffer(&buf);
}