PG_AUTOCTL_GET_NODE_CANDIDATE-PRIORITY(1)

πŸ“¦
version 2.1 Β· 2 versions
, in fedora 43, fedora 44

✨ NAME ✨

okay so bestie, this is pg_autoctl get node candidate-priority β€” and also pg_autoctl get candidate-priority, same energy, different spelling. What does it do? It gets the candidate-priority property from the monitor. That's it. That's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

This command prints pg_autoctl candidate priority for a given node, and here's the exact shape of it, no edits:

usage: pg_autoctl get node candidate-priority  [ --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

like. look at her. she's got four little flags and she knows how to use them. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

fr fr, if you wanna see the full list of replication settings, go look at pg_autoctl show settings. This command is just here for the one number. iykyk. πŸ’–


✨ OPTIONS ✨

  • --pgdata β€” where the Postgres node that's being managed locally actually lives. If you don't say anything, it defaults to the environment variable PGDATA. And btw, you can use --monitor to connect to a monitor from anywhere, instead of using the monitor URI that a local Postgres node managed with pg_autoctl would normally use. 🌈
  • --json β€” output the data in JSON format. that's it, that's the flag, she's simple and she's iconic. πŸ’€
  • --formation β€” show replication settings for a given formation. defaults to default. no cap. πŸŽ€
  • --name β€” show replication settings for a given node, selected by name. so you gotta tell her who. 🫢

🌸 EXAMPLES 🌸

okay here's the vibe in action, plain first:

$ pg_autoctl get node candidate-priority --name node1
50

and then the same thing but she's serving JSON realness:

$ pg_autoctl get node candidate-priority --name node1 --json
{
    "name": "node1",
    "candidate-priority": 50
}

the way it just works 😭✨


πŸ’œ AUTHOR πŸ’œ

Microsoft


Copyright (c) Microsoft Corporation. All rights reserved.


and that's the whole page bestie!! this was version 2.1, dated Jan 18, 2025, from the pg_auto_failover era of life. mwah, go get those candidate priorities πŸ’…πŸ’–

πŸ“¦ where this page comes from