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 the PGDATA environment variable. and lowkey, you can use --monitor to connect to a monitor from anywhere at all, instead of using the monitor URI that a local Postgres node managed with pg_autoctl would use. 🫢
  • --monitor β€” the Postgres URI used to connect to the monitor. bestie, it must use the autoctl_node username and it must target the pg_auto_failover database name. you can totally show the Postgres URI from the monitor node using the command pg_autoctl show uri. defaults to the value of the PG_AUTOCTL_MONITOR environment variable. ✨
  • --formation β€” show the current synchronous_standby_names value for the given formation. defaults to the default formation, because of course it does. πŸ¦‹
  • --group β€” show the current synchronous_standby_names value for the given group inside the given formation. defaults to group 0. πŸ“
  • --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 --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. πŸ“
  • 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 πŸ”₯

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 (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