1PG_AUTOCTL WATCH(1)            pg_auto_failover            PG_AUTOCTL WATCH(1)
2
3
4

NAME

6       pg_autoctl watch - pg_autoctl watch
7
8       pg_autoctl watch - Display an auto-updating dashboard
9

SYNOPSIS

11       This  command  outputs  the  events  that  the  pg_auto_failover events
12       records about state changes of the pg_auto_failover  nodes  managed  by
13       the monitor:
14
15          usage: pg_autoctl watch  [ --pgdata --formation --group ]
16
17          --pgdata      path to data directory
18          --monitor     show the monitor uri
19          --formation   formation to query, defaults to 'default'
20          --group       group to query formation, defaults to all
21          --json        output data in the JSON format
22

OPTIONS

24       --pgdata
25              Location of the Postgres node being managed locally. Defaults to
26              the environment variable PGDATA. Use --monitor to connect  to  a
27              monitor from anywhere, rather than the monitor URI used by a lo‐
28              cal Postgres node managed with pg_autoctl.
29
30       --monitor
31              Postgres URI used to connect to the monitor. Must  use  the  au‐
32              toctl_node  username  and  target  the pg_auto_failover database
33              name. It is possible to show the Postgres URI from  the  monitor
34              node using the command pg_autoctl_show_uri.
35
36       --formation
37              List  the  events recorded for nodes in the given formation. De‐
38              faults to default.
39
40       --group
41              Limit output to a single group in the formation. Default to  in‐
42              cluding all groups registered in the target formation.
43

DESCRIPTION

45       The pg_autoctl watch output is divided in 3 sections.
46
47       The  first  section  is a single header line which includes the name of
48       the currently selected formation,  the  formation  replication  setting
49       number_sync_standbys,  and  then in the right most position the current
50       time.
51
52       The second section displays one line per node, and each line contains a
53       list of columns that describe the current state for the node. This list
54       can includes the following columns, and which columns are part  of  the
55       output  depends on the terminal window size. This choice is dynamic and
56       changes if your terminal window size changes:
57
58          • Name
59                Name of the node.
60
61          • Node, or Id
62                Node information. When the formation has a single group (group
63                zero), then this column only contains the nodeId.
64
65                Only Citus formations allow several groups. When using a Citus
66                formation the Node column contains the groupId and the nodeId,
67                separated  by  a  colon, such as 0:1 for the first coordinator
68                node.
69
70          • Last Report, or Report
71                Time interval between now and the last known time when a  node
72                has reported to the monitor, using the node_active protocol.
73
74                This  value  is  expected  to  stay under 2s or abouts, and is
75                known to increment when either the pg_autoctl run  service  is
76                not running, or when there is a network split.
77
78          • Last Check, or Check
79                Time  inverval  between  now  and the last known time when the
80                monitor could connect to a node's Postgres instance,  via  its
81                health check mechanism.
82
83                This value is known to increment when either the Postgres ser‐
84                vice is not running on the target node, when there is  a  net‐
85                work  split,  or when the internal machinery (the health check
86                worker background process) implements jitter.
87
88          • Host:Port
89                Hostname and port number used to connect to the node.
90
91          • TLI: LSN
92                Timeline identifier (TLI) and  Postgres  Log  Sequence  Number
93                (LSN).
94
95                The  LSN  is  the current position in the Postgres WAL stream.
96                This is a hexadecimal number. See pg_lsn for more information.
97
98                The current timeline is incremented each time a failover  hap‐
99                pens,  or  when  doing Point In Time Recovery. A node can only
100                reach the secondary state when it is on the same  timeline  as
101                its primary node.
102
103          • Connection
104                This output field contains two bits of information. First, the
105                Postgres  connection  type  that  the  node  provides,  either
106                read-write  or  read-only.  Then  the mark ! is added when the
107                monitor has failed to connect to this node,  and  ?  when  the
108                monitor didn't connect to the node yet.
109
110          • Reported State
111                The current FSM state as reported to the monitor by the pg_au‐
112                toctl process running on the Postgres node.
113
114          • Assigned State
115                The assigned FSM state on the monitor. When the assigned state
116                is  not  the  same  as the reported start, then the pg_autoctl
117                process running on the Postgres node might have not  retrieved
118                the assigned state yet, or might still be implementing the FSM
119                transition from the current state to the assigned state.
120
121       The third and last section lists the most recent events that the  moni‐
122       tor has registered, the more recent event is found at the bottom of the
123       screen.
124
125       To quit the command hit either the F1 key or the q key.
126

AUTHOR

128       Microsoft
129
131       Copyright (c) Microsoft Corporation. All rights reserved.
132
133
134
135
1361.6                              Nov 24, 2021              PG_AUTOCTL WATCH(1)
Impressum