1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
.. _pg_autoctl_config_check:
pg_autoctl config check
=======================
pg_autoctl config check - Check pg_autoctl configuration
Synopsis
--------
This command implements a very basic list of sanity checks for a pg_autoctl
node setup::
usage: pg_autoctl config check [ --pgdata ] [ --json ]
--pgdata path to data directory
--json output data in the JSON format
Options
-------
--pgdata
Location of the Postgres node being managed locally. Defaults to the
environment variable ``PGDATA``. Use ``--monitor`` to connect to a monitor
from anywhere, rather than the monitor URI used by a local Postgres node
managed with ``pg_autoctl``.
--json
Output JSON formatted data.
Environment
-----------
PGDATA
Postgres directory location. Can be used instead of the ``--pgdata``
option.
PG_AUTOCTL_MONITOR
Postgres URI to connect to the monitor node, can be used instead of the
``--monitor`` option.
XDG_CONFIG_HOME
The pg_autoctl command stores its configuration files in the standard
place XDG_CONFIG_HOME. See the `XDG Base Directory Specification`__.
__ https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
XDG_DATA_HOME
The pg_autoctl command stores its internal states files in the standard
place XDG_DATA_HOME, which defaults to ``~/.local/share``. See the `XDG
Base Directory Specification`__.
__ https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Examples
--------
::
$ pg_autoctl config check --pgdata node1
18:37:27 63749 INFO Postgres setup for PGDATA "/Users/dim/dev/MS/pg_auto_failover/tmux/node1" is ok, running with PID 5501 and port 99698
18:37:27 63749 INFO Connection to local Postgres ok, using "port=5501 dbname=demo host=/tmp"
18:37:27 63749 INFO Postgres configuration settings required for pg_auto_failover are ok
18:37:27 63749 WARN Postgres 12.1 does not support replication slots on a standby node
18:37:27 63749 INFO Connection to monitor ok, using "postgres://autoctl_node@localhost:5500/pg_auto_failover?sslmode=prefer"
18:37:27 63749 INFO Monitor is running version "1.5.0.1", as expected
pgdata: /Users/dim/dev/MS/pg_auto_failover/tmux/node1
pg_ctl: /Applications/Postgres.app/Contents/Versions/12/bin/pg_ctl
pg_version: 12.3
pghost: /tmp
pgport: 5501
proxyport: 0
pid: 99698
is in recovery: no
Control Version: 1201
Catalog Version: 201909212
System Identifier: 6941034382470571312
Latest checkpoint LSN: 0/6000098
Postmaster status: ready
|