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 formated data.
26

DESCRIPTION

28       When the argument section.option is used, this is the name of a config‐
29       uration ooption. The configuration file for pg_autoctl is stored  using
30       the INI format.
31
32       When  no argument is given to pg_autoctl config get the entire configu‐
33       ration file is given in the output. To figure out where the  configura‐
34       tion  file  is stored, see pg_autoctl_show_file and use pg_autoctl show
35       file --config.
36

EXAMPLES

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

AUTHOR

98       Microsoft
99
101       Copyright (c) Microsoft Corporation. All rights reserved.
102
103
104
105
1061.6                              Jan 21, 2022         PG_AUTOCTL CONFIG GET(1)
Impressum