Commit 651da2e
committed
refactor: add pg_autoctl inspect and manual sub-command groups
Reorganise the operator-facing commands to make the binary more
approachable without the PG_AUTOCTL_DEBUG environment variable gate:
pg_autoctl inspect — read-only diagnostics, always visible
inspect pgsetup local PostgreSQL setup inspection
inspect fsm FSM state / list / graphviz (read-only subset)
inspect monitor get primary/others/candidate-count, parse-notification
inspect show ipaddr, cidr, lookup, hostname, reverse
pg_autoctl manual — operator-driven FSM operations for manual recovery
manual fsm assign / step / nodes get+set
manual service restart postgres|listener|node-active; pgctl on|off
manual monitor register / active / version
manual coordinator add / activate / remove / update
Both groups are always visible regardless of PG_AUTOCTL_DEBUG.
PG_AUTOCTL_DEBUG now only controls log verbosity, not command visibility.
Implementation details:
- Add bool hidden field to CommandLine struct so make_hidden_command_set
can register the internal sub-process entry points (pg_autoctl internal
service postgres|listener|node-active) without surfacing them in --help
- The supervisor now spawns pg_autoctl internal service ... instead of
the old pg_autoctl do service ... path; pg_autoctl do is trimmed to
tmux and demo tooling only
- Python test helpers updated to use inspect/manual in place of do
Documentation:
- Add docs/ref/pg_autoctl_inspect.rst and pg_autoctl_inspect_pgsetup.rst,
pg_autoctl_inspect_show.rst
- Add docs/ref/pg_autoctl_manual.rst and pg_autoctl_manual_service_restart.rst
- Trim docs/ref/pg_autoctl_do.rst to tmux/demo only; remove superseded
pg_autoctl_do_pgsetup.rst, pg_autoctl_do_service_restart.rst,
pg_autoctl_do_show.rst
- Update failover-state-machine.rst: pg_autoctl inspect fsm gv (no longer
requires PG_AUTOCTL_DEBUG)1 parent 1b2f3c6 commit 651da2e
29 files changed
Lines changed: 1841 additions & 500 deletions
File tree
- docs
- ref
- src/bin
- lib/subcommands.c
- pg_autoctl
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
| 280 | + | |
| 281 | + | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 18 | | |
26 | | - | |
27 | | - | |
| 19 | + | |
28 | 20 | | |
29 | 21 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 22 | + | |
| 23 | + | |
121 | 24 | | |
122 | 25 | | |
123 | 26 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments