Improvements to repmgr cluster show

Add documentation; show recovery status in --csv mode.
This commit is contained in:
Ian Barwick
2017-07-20 10:25:13 +09:00
parent a5c5d9fa40
commit b99443b0c8
6 changed files with 118 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ typedef enum {
} ExtensionStatus;
typedef enum {
RECTYPE_UNKNOWN = 0,
RECTYPE_UNKNOWN = -1,
RECTYPE_PRIMARY,
RECTYPE_STANDBY
} RecoveryType;
@@ -79,6 +79,7 @@ typedef struct s_node_info
/* used during failover to track node status */
XLogRecPtr last_wal_receive_lsn;
NodeStatus node_status;
RecoveryType recovery_type;
MonitoringState monitoring_state;
PGconn *conn;
/* for ad-hoc use e.g. when working with a list of nodes */
@@ -100,6 +101,7 @@ typedef struct s_node_info
"", \
InvalidXLogRecPtr, \
NODE_STATUS_UNKNOWN, \
RECTYPE_UNKNOWN, \
MS_NORMAL, \
NULL, \
"" \