PG_AUTOCTL SHOW STANDBY-NAMES(1)
π pg_autoctl show standby-names β the vibe check on your sync standbys π
okay bestie, so this page is from the pg_auto_failover manual, section 1, and it's all about the pg_autoctl show standby-names command. it does exactly one thing and it does it iconically: it prints out the synchronous_standby_names for a given group. that's it. that's the whole job. π
β¨ NAME β¨
pg_autoctl show standby-names β prints synchronous_standby_names for a given group. no cap.
pg_autoctl show standby-names β literally prints the synchronous_standby_names value for a given group, and that's the tea.
πΈ SYNOPSIS πΈ
this command prints the current value of synchronous_standby_names for the primary Postgres server of the target group (defaults to 0) in the target formation (defaults to default), as computed by the monitor. not by you, not by vibes β by the monitor. the monitor is the main character here. π
usage: pg_autoctl show standby-names [ --pgdata ] --formation --group
--pgdata path to data directory
--monitor pg_auto_failover Monitor Postgres URL
--formation formation to query, defaults to 'default'
--group group to query formation, defaults to all
--json output data in the JSON format
π OPTIONS π
--pgdataβ the location of the Postgres node being managed locally. defaults to whatever's in thePGDATAenvironment variable. and lowkey, you can use--monitorto connect to a monitor from anywhere at all, instead of using the monitor URI that a local Postgres node managed withpg_autoctlwould use. π«Ά--monitorβ the Postgres URI used to connect to the monitor. bestie, it must use theautoctl_nodeusername and it must target thepg_auto_failoverdatabase name. you can totally show the Postgres URI from the monitor node using the commandpg_autoctl show uri. defaults to the value of thePG_AUTOCTL_MONITORenvironment variable. β¨--formationβ show the currentsynchronous_standby_namesvalue for the given formation. defaults to thedefaultformation, because of course it does. π¦--groupβ show the currentsynchronous_standby_namesvalue for the given group inside the given formation. defaults to group0. π--jsonβ output a JSON formatted data instead of a table formatted list. glow-up mode activated. β
π ENVIRONMENT π
PGDATAβ Postgres directory location. can be used instead of the--pgdataoption. π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. π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. π
π₯ EXAMPLES π₯
look at it go, bestie:
$ pg_autoctl show standby-names
'ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3)'
$ pg_autoctl show standby-names --json
{
"formation": "default",
"group": 0,
"synchronous_standby_names": "ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3)"
}
the first one is giving clean table energy, the second one is giving β¨ structured dataβ¨. pick your fighter. π₯
π AUTHOR π
Microsoft
π COPYRIGHT π
Copyright (c) Microsoft Corporation. All rights reserved.
and that's the whole page, bestie!! π this was pg_autoctl show standby-names from pg_auto_failover version 2.2, dated Apr 07, 2025 β slay, go forth, and check those standby names. periodt. πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- debian trixie: pg-auto-failover-cli 2.2-2 Β· PostgreSQL
- ubuntu questing: pg-auto-failover-cli 2.2-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms