.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "PG_AUTOCTL CONFIG GET" "1" "Nov 06, 2022" "2.0" "pg_auto_failover" .SH NAME pg_autoctl config get \- pg_autoctl config get .sp pg_autoctl config get \- Get the value of a given pg_autoctl configuration variable .SH SYNOPSIS .sp This command prints a \fBpg_autoctl\fP configuration setting: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C usage: pg_autoctl config get [ \-\-pgdata ] [ \-\-json ] [ section.option ] \-\-pgdata path to data directory .ft P .fi .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-\-pgdata Location of the Postgres node being managed locally. Defaults to the environment variable \fBPGDATA\fP\&. Use \fB\-\-monitor\fP to connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed with \fBpg_autoctl\fP\&. .TP .B \-\-json Output JSON formatted data. .UNINDENT .SH ENVIRONMENT .sp PGDATA .INDENT 0.0 .INDENT 3.5 Postgres directory location. Can be used instead of the \fB\-\-pgdata\fP option. .UNINDENT .UNINDENT .sp PG_AUTOCTL_MONITOR .INDENT 0.0 .INDENT 3.5 Postgres URI to connect to the monitor node, can be used instead of the \fB\-\-monitor\fP option. .UNINDENT .UNINDENT .sp XDG_CONFIG_HOME .INDENT 0.0 .INDENT 3.5 The pg_autoctl command stores its configuration files in the standard place XDG_CONFIG_HOME. See the \fI\%XDG Base Directory Specification\fP\&. .UNINDENT .UNINDENT .sp XDG_DATA_HOME .INDENT 0.0 .INDENT 3.5 The pg_autoctl command stores its internal states files in the standard place XDG_DATA_HOME, which defaults to \fB~/.local/share\fP\&. See the \fI\%XDG Base Directory Specification\fP\&. .UNINDENT .UNINDENT .SH DESCRIPTION .sp When the argument \fBsection.option\fP is used, this is the name of a configuration ooption. The configuration file for \fBpg_autoctl\fP is stored using the INI format. .sp When no argument is given to \fBpg_autoctl config get\fP the entire configuration file is given in the output. To figure out where the configuration file is stored, see \fI\%pg_autoctl show file\fP and use \fBpg_autoctl show file \-\-config\fP\&. .SH EXAMPLES .sp Without arguments, we get the entire file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ 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 .ft P .fi .UNINDENT .UNINDENT .sp It is possible to pipe JSON formatted output to the \fBjq\fP command line and filter the result down to a specific section of the file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ 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" } .ft P .fi .UNINDENT .UNINDENT .sp Finally, a single configuration element can be listed: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ pg_autoctl config get \-\-pgdata node1 ssl.sslmode \-\-json require .ft P .fi .UNINDENT .UNINDENT .SH AUTHOR Microsoft .SH COPYRIGHT Copyright (c) Microsoft Corporation. All rights reserved. .\" Generated by docutils manpage writer. .