PG_AUTOCTL_GET_NODE_CANDIDATE-PRIORITY(1)
β¨ 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 variablePGDATA. And btw, you can use--monitorto connect to a monitor from anywhere, instead of using the monitor URI that a local Postgres node managed withpg_autoctlwould 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 todefault. 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 π
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
- 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