mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
repmgr node status: add "raw" data columns too
This commit is contained in:
@@ -161,6 +161,7 @@ do_node_status(void)
|
|||||||
|
|
||||||
if (runtime_options.csv == true)
|
if (runtime_options.csv == true)
|
||||||
{
|
{
|
||||||
|
/* output header */
|
||||||
appendPQExpBuffer(
|
appendPQExpBuffer(
|
||||||
&output,
|
&output,
|
||||||
"\"Node name\",\"Node ID\",");
|
"\"Node name\",\"Node ID\",");
|
||||||
@@ -169,22 +170,18 @@ do_node_status(void)
|
|||||||
{
|
{
|
||||||
appendPQExpBuffer(
|
appendPQExpBuffer(
|
||||||
&output,
|
&output,
|
||||||
"\"%s\"", cell->key);
|
"\"%s\",", cell->key);
|
||||||
|
|
||||||
if (cell->next)
|
|
||||||
{
|
|
||||||
appendPQExpBuffer(
|
|
||||||
&output,
|
|
||||||
",");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
appendPQExpBuffer(
|
|
||||||
&output,
|
|
||||||
"\n");
|
|
||||||
|
|
||||||
|
/* we'll add the raw data as well */
|
||||||
appendPQExpBuffer(
|
appendPQExpBuffer(
|
||||||
&output,
|
&output,
|
||||||
"%s,%i,",
|
"max_walsenders,occupied_walsenders,max_replication_slots,active_replication_slots,inactive_replaction_slots\n");
|
||||||
|
|
||||||
|
/* output data */
|
||||||
|
appendPQExpBuffer(
|
||||||
|
&output,
|
||||||
|
"\"%s\",%i,",
|
||||||
node_info.node_name,
|
node_info.node_name,
|
||||||
node_info.node_id);
|
node_info.node_id);
|
||||||
|
|
||||||
@@ -192,19 +189,17 @@ do_node_status(void)
|
|||||||
{
|
{
|
||||||
appendPQExpBuffer(
|
appendPQExpBuffer(
|
||||||
&output,
|
&output,
|
||||||
"\"%s\"", cell->value);
|
"\"%s\",", cell->value);
|
||||||
|
|
||||||
if (cell->next)
|
|
||||||
{
|
|
||||||
appendPQExpBuffer(
|
|
||||||
&output,
|
|
||||||
",");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
appendPQExpBuffer(
|
appendPQExpBuffer(
|
||||||
&output,
|
&output,
|
||||||
"\n");
|
"%i,%i,%i,%i,%i\n",
|
||||||
|
node_info.max_wal_senders,
|
||||||
|
node_info.attached_wal_receivers,
|
||||||
|
node_info.max_replication_slots,
|
||||||
|
node_info.active_replication_slots,
|
||||||
|
node_info.inactive_replication_slots);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user