show-events v5.6

Shows events such as background worker errors and node membership changes.

Synopsis

Shows events such as background worker errors and node membership changes. Output is sorted by Time column in descending order. Message column is truncated after a few lines. To view complete message use json output format (-o json).

For more details on each node state, see show-nodes command help (pgd show-nodes -h).

pgd show-events [flags]

Node States

StateDescription
NONENode state is unset when the worker starts, expected to be set quickly to the current known state.
CREATEDbdr.create_node() has been executed, but the node isn't a member of any EDB Postgres Distributed cluster yet.
JOIN_STARTbdr.join_node_group() begins to join the local node to an existing EDB Postgres Distributed cluster.
JOININGThe node join has started and is currently at the initial sync phase, creating the schema and data on the node.
CATCHUPInitial sync phase is complete; now the join is at the last step of retrieving and applying transactions that were performed on the upstream peer node since the join started.
STANDBYNode join has finished, but not yet started to broadcast changes. All joins spend some time in this state, but if defined as a Logical Standby, the node will continue in this state.
PROMOTENode was a logical standby and we just called bdr.promote_node to move the node state to ACTIVE. These two PROMOTE states have to be coherent to the fact, that only one node can be with a state higher than STANDBY but lower than ACTIVE.
PROMOTINGPromotion from logical standby to full BDR node is in progress.
ACTIVEThe node is a full BDR node and is currently ACTIVE. This is the most common node status.
PART_STARTNode was ACTIVE or STANDBY and we just called bdr.part_node to remove the node from the EDB Postgres Distributed cluster.
PARTINGNode disconnects from other nodes and plays no further part in consensus or replication.
PART_CATCHUPNon-parting nodes synchronize any missing data from the recently parted node.
PARTEDNode parting operation is now complete on all nodes.

Only one node at a time can be in either of the states PROMOTE or PROMOTING. STANDBY indicates that the node is in a read-only state.

Options

FlagDescription
-n, --linesshow top n lines

See global options for global options.

Examples

Showing top 10 events

In this example, we show top 10 events on a three node cluster.

$ pgd show-events --lines 10
Output
Time                          Observer Node Subject Node Source    Type   Subtype      Message
----                          ------------- ------------ ------    ----   -------      -------
2023-03-23 05:38:25.243257+00 witness-a1    witness-a1   consensus RAFT   STATE_CHANGE RAFT_LEADER
2023-03-23 05:38:25.23815+00  witness-a1    witness-a1   consensus RAFT   STATE_CHANGE RAFT_CANDIDATE
2023-03-23 05:38:21.197974+00 bdr-a1        bdr-a1       consensus RAFT   STATE_CHANGE RAFT_FOLLOWER
2023-03-23 05:38:21.197107+00 witness-a1    witness-a1   consensus RAFT   STATE_CHANGE RAFT_FOLLOWER
2023-03-23 05:38:21.169781+00 bdr-a2        bdr-a2       consensus RAFT   STATE_CHANGE RAFT_FOLLOWER
2023-03-23 05:38:17.949669+00 witness-a1    bdr-a1       consensus NODE   STATE_CHANGE ACTIVE
2023-03-23 05:38:17.949544+00 bdr-a1        bdr-a1       consensus NODE   STATE_CHANGE ACTIVE
2023-03-23 05:38:17.946857+00 bdr-a2        bdr-a1       consensus NODE   STATE_CHANGE ACTIVE
2023-03-23 05:38:17.91628+00  bdr-a1        bdr-a2       receiver  WORKER ERROR        pglogical worker received fast finish request, exiting
2023-03-23 05:38:17.915236+00 witness-a1    bdr-a1       consensus NODE   STATE_CHANGE PROMOTING