1PG_AUTOCTL CONFIG GET(1)       pg_auto_failover       PG_AUTOCTL CONFIG GET(1)
2
3
4

NAME

6       pg_autoctl config get - pg_autoctl config get
7
8       pg_autoctl  config get - Get the value of a given pg_autoctl configura‐
9       tion variable
10

SYNOPSIS

12       This command prints a pg_autoctl configuration setting:
13
14          usage: pg_autoctl config get  [ --pgdata ] [ --json ] [ section.option ]
15
16          --pgdata      path to data directory
17

OPTIONS

19       --pgdata
20              Location of the Postgres node being managed locally. Defaults to
21              the  environment  variable PGDATA. Use --monitor to connect to a
22              monitor from anywhere, rather than the monitor URI used by a lo‐
23              cal Postgres node managed with pg_autoctl.
24
25       --json Output JSON formatted data.
26

ENVIRONMENT

28       PGDATA
29          Postgres directory location. Can be used instead of the --pgdata op‐
30          tion.
31
32       PG_AUTOCTL_MONITOR
33          Postgres URI to connect to the monitor node, can be used instead  of
34          the --monitor option.
35
36       XDG_CONFIG_HOME
37          The  pg_autoctl  command stores its configuration files in the stan‐
38          dard place XDG_CONFIG_HOME. See the XDG  Base  Directory  Specifica‐
39          tion.
40
41       XDG_DATA_HOME
42          The pg_autoctl command stores its internal states files in the stan‐
43          dard place XDG_DATA_HOME, which defaults to ~/.local/share. See  the
44          XDG Base Directory Specification.
45

DESCRIPTION

47       When the argument section.option is used, this is the name of a config‐
48       uration ooption. The configuration file for pg_autoctl is stored  using
49       the INI format.
50
51       When  no argument is given to pg_autoctl config get the entire configu‐
52       ration file is given in the output. To figure out where the  configura‐
53       tion  file  is stored, see pg_autoctl show file and use pg_autoctl show
54       file --config.
55

EXAMPLES

57       Without arguments, we get the entire file:
58
59          $ pg_autoctl config get --pgdata node1
60          [pg_autoctl]
61          role = keeper
62          monitor = postgres://autoctl_node@localhost:5500/pg_auto_failover?sslmode=prefer
63          formation = default
64          group = 0
65          name = node1
66          hostname = localhost
67          nodekind = standalone
68
69          [postgresql]
70          pgdata = /Users/dim/dev/MS/pg_auto_failover/tmux/node1
71          pg_ctl = /Applications/Postgres.app/Contents/Versions/12/bin/pg_ctl
72          dbname = demo
73          host = /tmp
74          port = 5501
75          proxyport = 0
76          listen_addresses = *
77          auth_method = trust
78          hba_level = app
79
80          [ssl]
81          active = 1
82          sslmode = require
83          cert_file = /Users/dim/dev/MS/pg_auto_failover/tmux/node1/server.crt
84          key_file = /Users/dim/dev/MS/pg_auto_failover/tmux/node1/server.key
85
86          [replication]
87          maximum_backup_rate = 100M
88          backup_directory = /Users/dim/dev/MS/pg_auto_failover/tmux/backup/node_1
89
90          [timeout]
91          network_partition_timeout = 20
92          prepare_promotion_catchup = 30
93          prepare_promotion_walreceiver = 5
94          postgresql_restart_failure_timeout = 20
95          postgresql_restart_failure_max_retries = 3
96
97       It is possible to pipe JSON formatted output to the jq command line and
98       filter the result down to a specific section of the file:
99
100          $ pg_autoctl config get --pgdata node1 --json | jq .pg_autoctl
101          {
102            "role": "keeper",
103            "monitor": "postgres://autoctl_node@localhost:5500/pg_auto_failover?sslmode=prefer",
104            "formation": "default",
105            "group": 0,
106            "name": "node1",
107            "hostname": "localhost",
108            "nodekind": "standalone"
109          }
110
111       Finally, a single configuration element can be listed:
112
113          $ pg_autoctl config get --pgdata node1 ssl.sslmode --json
114          require
115

AUTHOR

117       Microsoft
118
120       Copyright (c) Microsoft Corporation. All rights reserved.
121
122
123
124
1252.0                              Sep 13, 2023         PG_AUTOCTL CONFIG GET(1)
Impressum