PG_AUTOCTL GET NODE REPLICATION-QUORUM(1)

πŸ’– NAME πŸ’–

pg_autoctl get node replication-quorum β€” bestie, this is the glow-up command that pulls the replication-quorum property straight off the monitor, and it's part of the pg_auto_failover family of tools (manual section 1, iykyk).

There's also a shorter lil' alias for it:

  • pg_autoctl get replication-quorum β€” same vibe, gets the replication-quorum property from the monitor.

✨ SYNOPSIS ✨

This command prints the pg_autoctl replication quorum for a given node, no cap:

usage: pg_autoctl get node replication-quorum  [ --pgdata ] [ --json ] [ --formation ] [ --name ]

--pgdata      path to data directory
--formation   pg_auto_failover formation
--name        pg_auto_failover node name
--json        output data in the JSON format

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so real talk β€” if you wanna see the whole menu of replication settings, go check out pg_autoctl show settings. This command is just the one dish: the replication-quorum. πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • --pgdata β€” where the Postgres node you're managing locally keeps its data directory. Defaults to whatever the PGDATA environment variable says. Pro tip: use --monitor if you wanna connect to a monitor from literally anywhere, instead of using the monitor URI that a local Postgres node managed with pg_autoctl would use. 🫢
  • --json β€” spits the data out in JSON format, for when you want it machine-readable and chic.
  • --formation β€” shows the replication settings for the formation you name. Defaults to default, bestie.
  • --name β€” shows the replication settings for the node you pick, selected by name. πŸ‘‘

🌸 ENVIRONMENT 🌸

  • PGDATA β€” the Postgres directory location. You can use this instead of the --pgdata option. Iconic shortcut energy.
  • PG_AUTOCTL_MONITOR β€” the Postgres URI used 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 🌈

Just asking for the quorum like a normal person:

$ pg_autoctl get node replication-quorum --name node1
true

And now the same thing but make it JSON:

$ pg_autoctl get node replication-quorum --name node1 --json
{
    "name": "node1",
    "replication-quorum": true
}

πŸ‘‘ AUTHOR πŸ‘‘

Microsoft


Copyright (c) Microsoft Corporation. All rights reserved.


And that's the whole page, bestie β€” no crumbs left. This was pg_autoctl get node replication-quorum, manual section 1, shipped with pg_auto_failover version 2.2, dated Apr 07, 2025. Slay, go check your quorum. πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from