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

ENVIRONMENT

45       PGDATA
46          Postgres directory location. Can be used instead of the --pgdata op‐
47          tion.
48
49       PG_AUTOCTL_MONITOR
50          Postgres URI to connect to the monitor node, can be used instead  of
51          the --monitor option.
52
53       XDG_CONFIG_HOME
54          The  pg_autoctl  command stores its configuration files in the stan‐
55          dard place XDG_CONFIG_HOME. See the XDG  Base  Directory  Specifica‐
56          tion.
57
58       XDG_DATA_HOME
59          The pg_autoctl command stores its internal states files in the stan‐
60          dard place XDG_DATA_HOME, which defaults to ~/.local/share. See  the
61          XDG Base Directory Specification.
62

DESCRIPTION

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

AUTHOR

147       Microsoft
148
150       Copyright (c) Microsoft Corporation. All rights reserved.
151
152
153
154
1552.0                              Sep 13, 2023              PG_AUTOCTL WATCH(1)
Impressum