PG_AUTOCTL_CONFIG_GET(1)
π PG_AUTOCTL CONFIG GET β the pg_auto_failover girlies' guide β¨
okay so bestie, this is the manual page for pg_autoctl config get, straight out of the pg_auto_failover family (version 2.1, no cap). Buckle up, we're getting your config values and we're gonna look cute doing it. π
β¨ NAME β¨
pg_autoctl config get β literally just pg_autoctl config get
pg_autoctl config get β bestie, it gets the value of a given pg_autoctl configuration variable. That's the whole vibe. πΈ
π SYNOPSIS π
This command prints a pg_autoctl configuration setting, and here's the glow-up:
usage: pg_autoctl config get [ --pgdata ] [ --json ] [ section.option ]
--pgdata path to data directory
π OPTIONS π
--pgdataβ where your Postgres node lives locally, aka the location of the Postgres node being managed locally. It defaults to the environment variablePGDATA. Pro tip moment: use--monitorto connect to a monitor from anywhere, instead of the monitor URI that a local Postgres node managed withpg_autoctlis using. iykyk π--jsonβ outputs JSON formatted data. slay. β¨
π¦ ENVIRONMENT π¦
PGDATAβ Postgres directory location. You can use this instead of the--pgdataoption. lowkey convenient fr fr.PG_AUTOCTL_MONITORβ Postgres URI to connect to the monitor node, can be used instead of the--monitoroption. π«ΆXDG_CONFIG_HOMEβ thepg_autoctlcommand stores its configuration files in the standard placeXDG_CONFIG_HOME. See the XDG Base Directory Specification. very organized of it honestly.XDG_DATA_HOMEβ thepg_autoctlcommand stores its internal states files in the standard placeXDG_DATA_HOME, which defaults to~/.local/share. See the XDG Base Directory Specification. π
πΈ DESCRIPTION πΈ
So when you pass the argument section.option, that's the name of a configuration ooption (yes bestie, the original really spells it like that, iconic typo, we keep it π). The configuration file for pg_autoctl is stored using the INI format.
And when no argument is given to pg_autoctl config get, the entire configuration file is given in the output. the way thatβ¦ it just dumps everything. π To figure out where the configuration file is stored, see pg_autoctl show file and use pg_autoctl show file --config. π
π₯ EXAMPLES π₯
Without arguments, we get the entire file. main character energy:
$ pg_autoctl config get --pgdata node1
[pg_autoctl]
role = keeper
monitor = postgres://autoctl_node@localhost:5500/pg_auto_failover?sslmode=prefer
formation = default
group = 0
name = node1
hostname = localhost
nodekind = standalone
[postgresql]
pgdata = /Users/dim/dev/MS/pg_auto_failover/tmux/node1
pg_ctl = /Applications/Postgres.app/Contents/Versions/12/bin/pg_ctl
dbname = demo
host = /tmp
port = 5501
proxyport = 0
listen_addresses = *
auth_method = trust
hba_level = app
[ssl]
active = 1
sslmode = require
cert_file = /Users/dim/dev/MS/pg_auto_failover/tmux/node1/server.crt
key_file = /Users/dim/dev/MS/pg_auto_failover/tmux/node1/server.key
[replication]
maximum_backup_rate = 100M
backup_directory = /Users/dim/dev/MS/pg_auto_failover/tmux/backup/node_1
[timeout]
network_partition_timeout = 20
prepare_promotion_catchup = 30
prepare_promotion_walreceiver = 5
postgresql_restart_failure_timeout = 20
postgresql_restart_failure_max_retries = 3
It is possible to pipe JSON formatted output to the jq command line and filter the result down to a specific section of the file. obsessed with this combo actually:
$ pg_autoctl config get --pgdata node1 --json | jq .pg_autoctl
{
"role": "keeper",
"monitor": "postgres://autoctl_node@localhost:5500/pg_auto_failover?sslmode=prefer",
"formation": "default",
"group": 0,
"name": "node1",
"hostname": "localhost",
"nodekind": "standalone"
}
Finally, a single configuration element can be listed. tiny little snack of an output:
$ pg_autoctl config get --pgdata node1 ssl.sslmode --json
require
π AUTHOR π
Microsoft
π COPYRIGHT π
Copyright (c) Microsoft Corporation. All rights reserved.
and that's the whole page bestie!! π this was PG_AUTOCTL CONFIG GET(1) from pg_auto_failover, version 2.1, dated Jan 18, 2025 β go forth and read your config, you absolute icon π¦β¨π
π¦ where this page comes from
- fedora 43: pg_auto_failover 2.1-6.fc42 Β· Apache-1.0
- fedora 44: pg_auto_failover 2.1-6.fc42 Β· Apache-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms