1PG_AUTOCTL STATUS(1) pg_auto_failover PG_AUTOCTL STATUS(1)
2
3
4
6 pg_autoctl status - pg_autoctl status
7
8 pg_autoctl status - Display the current status of the pg_autoctl ser‐
9 vice
10
12 This commands outputs the current process status for the pg_autoctl
13 service running for the given --pgdata location.
14
15 usage: pg_autoctl status [ --pgdata ] [ --json ]
16
17 --pgdata path to data directory
18 --json output data in the JSON format
19
21 --pgdata
22 Location of the Postgres node being managed locally. Defaults to
23 the environment variable PGDATA. Use --monitor to connect to a
24 monitor from anywhere, rather than the monitor URI used by a lo‐
25 cal Postgres node managed with pg_autoctl.
26
27 --json Output a JSON formatted data instead of a table formatted list.
28
30 PGDATA
31 Postgres directory location. Can be used instead of the --pgdata op‐
32 tion.
33
34 PG_AUTOCTL_MONITOR
35 Postgres URI to connect to the monitor node, can be used instead of
36 the --monitor option.
37
38 XDG_CONFIG_HOME
39 The pg_autoctl command stores its configuration files in the stan‐
40 dard place XDG_CONFIG_HOME. See the XDG Base Directory Specifica‐
41 tion.
42
43 XDG_DATA_HOME
44 The pg_autoctl command stores its internal states files in the stan‐
45 dard place XDG_DATA_HOME, which defaults to ~/.local/share. See the
46 XDG Base Directory Specification.
47
49 $ pg_autoctl status --pgdata node1
50 11:26:30 27248 INFO pg_autoctl is running with pid 26618
51 11:26:30 27248 INFO Postgres is serving PGDATA "/Users/dim/dev/MS/pg_auto_failover/tmux/node1" on port 5501 with pid 26725
52
53 $ pg_autoctl status --pgdata node1 --json
54 11:26:37 27385 INFO pg_autoctl is running with pid 26618
55 11:26:37 27385 INFO Postgres is serving PGDATA "/Users/dim/dev/MS/pg_auto_failover/tmux/node1" on port 5501 with pid 26725
56 {
57 "postgres": {
58 "pgdata": "\/Users\/dim\/dev\/MS\/pg_auto_failover\/tmux\/node1",
59 "pg_ctl": "\/Applications\/Postgres.app\/Contents\/Versions\/12\/bin\/pg_ctl",
60 "version": "12.3",
61 "host": "\/tmp",
62 "port": 5501,
63 "proxyport": 0,
64 "pid": 26725,
65 "in_recovery": false,
66 "control": {
67 "version": 0,
68 "catalog_version": 0,
69 "system_identifier": "0"
70 },
71 "postmaster": {
72 "status": "ready"
73 }
74 },
75 "pg_autoctl": {
76 "pid": 26618,
77 "status": "running",
78 "pgdata": "\/Users\/dim\/dev\/MS\/pg_auto_failover\/tmux\/node1",
79 "version": "1.5.0",
80 "semId": 196609,
81 "services": [
82 {
83 "name": "postgres",
84 "pid": 26625,
85 "status": "running",
86 "version": "1.5.0",
87 "pgautofailover": "1.5.0.1"
88 },
89 {
90 "name": "node-active",
91 "pid": 26626,
92 "status": "running",
93 "version": "1.5.0",
94 "pgautofailover": "1.5.0.1"
95 }
96 ]
97 }
98 }
99
101 Microsoft
102
104 Copyright (c) Microsoft Corporation. All rights reserved.
105
106
107
108
1092.0 Sep 13, 2023 PG_AUTOCTL STATUS(1)