Update "repmgr cluster event" documentation and --help output

This commit is contained in:
Ian Barwick
2017-08-17 10:40:48 +09:00
parent c93fa73a71
commit bbd59ab9a2
2 changed files with 18 additions and 1 deletions

View File

@@ -52,7 +52,9 @@ The following commands are available:
repmgr node check
repmgr cluster show
repmgr cluster event [--all] [--node-id] [--node-name] [--event] [--event-matching]
repmgr cluster matrix
repmgr cluster crosscheck
repmgr cluster event
* `primary register`
@@ -261,6 +263,18 @@ The following commands are available:
able to connect to `node3` and therefore determine the state of
outbound connections from that node.
* `cluster event`
This outputs a formatted list of cluster events, as stored in the
`repmgr.events` table. Output is in reverse chronological order, and
can be filtered with the following options:
* `--all`: outputs all entries
* `--limit`: set the maximum number of entries to output (default: 20)
* `--node-id`: restrict entries to node with this ID
* `--node-name`: restrict entries to node with this name
* `--event`: filter specific event
Backwards compatibility
-----------------------

View File

@@ -416,6 +416,9 @@ do_cluster_event(void)
log_debug("do_cluster_event():\n%s", query.data);
res = PQexec(conn, query.data);
termPQExpBuffer(&query);
termPQExpBuffer(&where_clause);
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
log_error(_("unable to execute event query:\n %s"),