PG_AUTOCTL_SHOW_STANDBY-NAMES(1)
π pg_autoctl show standby-names π
okay bestie, welcome to pg_autoctl show standby-names β it's part of the pg_auto_failover family and it's literally the command that prints out synchronous_standby_names for a given group. no cap. π¦
β¨ NAME β¨
pg_autoctl show standby-names β that's the name, that's the whole vibe π
pg_autoctl show standby-names β Prints synchronous_standby_names for a given group. periodt. π
πΈ SYNOPSIS πΈ
so here's the tea: this command prints the current value of synchronous_standby_names for the primary Postgres server of the target group (and btw the default group is 0) inside the target formation (and the default formation is default, obvi), exactly as computed by the monitor. πβ¨
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 π
okay so these are the levers you can pull, and every single one of them matters:
--pgdataβ the location of the Postgres node being managed locally. It defaults to the environment variablePGDATA. lowkey iconic tip: use--monitorif you wanna connect to a monitor from literally anywhere, instead of using the monitor URI that a local Postgres node managed withpg_autoctlis using. π«Ά--monitorβ the Postgres URI you use to connect to the monitor. bestie it must use theautoctl_nodeusername and it must target thepg_auto_failoverdatabase name. and yes, you can show the Postgres URI from the monitor node using the commandpg_autoctl show uri. β¨ It defaults to the value of the environment variablePG_AUTOCTL_MONITOR.--formationβ show the currentsynchronous_standby_namesvalue for the given formation. Defaults to thedefaultformation. π--groupβ show the currentsynchronous_standby_namesvalue for the given group in the given formation. Defaults to group0. π--jsonβ Output a JSON formatted data instead of a table formatted list. it's giving structured data realness. π
π ENVIRONMENT π
the vibes the shell hands you before you even type anything:
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 β
not me showing you exactly how it goes down, fr fr:
$ 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)"
}
like... look at that. ANY 1 (pgautofailover_standby_2, pgautofailover_standby_3). iconic. ππ₯
π«Ά AUTHOR π«Ά
Microsoft. that's it, that's the author. π
π COPYRIGHT π
Copyright (c) Microsoft Corporation. All rights reserved.
okay that's the whole page, bestie, you ate it up. π¦ this was version 2.1, dated Jan 18, 2025, and it's part of the pg_auto_failover manual. mwah. π β¨π
π¦ 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