PG_AUTOCTL CONFIG CHECK(1)

✨ PG_AUTOCTL CONFIG CHECK(1) ✨

okay bestie, welcome to the pg_autoctl config check page, which lives in the pg_auto_failover manual. it's literally the vibe check for your node setup πŸ’…


🌸 NAME 🌸

pg_autoctl config check β€” pg_autoctl config check

pg_autoctl config check β€” Check pg_autoctl configuration

(no cap, it says it twice, and honestly? iconic.)


πŸ¦‹ SYNOPSIS πŸ¦‹

this command runs a very basic list of sanity checks on your pg_autoctl node setup, and by "very basic" we mean it, bestie, it's not doing a whole forensic audit 🫢

usage: pg_autoctl config check  [ --pgdata ] [ --json ]

--pgdata      path to data directory
--json        output data in the JSON format

πŸ’– OPTIONS πŸ’–

  • --pgdata β€” where the Postgres node you're managing locally keeps its little home. defaults to the env var PGDATA. also: use --monitor when you want to connect to a monitor from anywhere, rather than the monitor URI that a local Postgres node managed with pg_autoctl is using. ✨
  • --json β€” outputs the data in JSON format. that's it, that's the whole flag. πŸ’…

🌈 ENVIRONMENT 🌈

  • PGDATA Postgres directory location. can be used instead of the --pgdata option. πŸŽ€
  • PG_AUTOCTL_MONITOR Postgres URI for connecting 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. πŸ¦‹
  • 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. πŸ¦‹

⭐ EXAMPLES ⭐

here's what a good run looks like, and ngl, it's giving "everything is fine and we love that for us":

$ 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
not me pointing out that lil WARN in the middle β€” Postgres 12.1 does not support replication slots on a standby node. the check will still run, it just tells you the tea. 😭

πŸ‘‘ AUTHOR πŸ‘‘

Microsoft


Copyright (c) Microsoft Corporation. All rights reserved.


and that's the whole page, bestie!! 🫢 this was version 2.2 of the pg_auto_failover manual, dated Apr 07, 2025 β€” go forth, run your config check, and may your postmaster status always be ready πŸ’œβœ¨

πŸ“¦ where this page comes from