PG_AUTOCTL GET NODE CANDIDATE-PRIORITY(1)

✨ PG_AUTOCTL GET NODE CANDIDATE-PRIORITY ✨

okay bestie, welcome to the pg_auto_failover manual, this one's from pg_autoctl and it is genuinely so useful, i promise πŸ’–


🌸 NAME 🌸

pg_autoctl get node candidate-priority β€” pg_autoctl get node candidate-priority

pg_autoctl get candidate-priority β€” bestie, this one grabs the candidate-priority property straight from the monitor ✨


πŸŽ€ SYNOPSIS πŸŽ€

so basically, this command prints the pg_autoctl candidate priority for a given node:

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

πŸ’… DESCRIPTION πŸ’…

ngl, the one thing to know here is: also go look at pg_autoctl show settings if you want the full list of replication settings πŸ‘‘ like, that's where the whole menu lives.


✨ OPTIONS ✨

  • --pgdata β€” this is where the Postgres node you're managing locally keeps its data. defaults to the environment variable PGDATA. and like, 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 β€” outputs the data in JSON format ✨
  • --formation β€” shows replication settings for the given formation. defaults to default πŸŽ€
  • --name β€” shows replication settings for the given node, picked out by name πŸ’–

🌈 EXAMPLES 🌈

first one, no json, just the number, slay:

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

and now with --json because we love structured data in this house:

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

πŸ‘‘ AUTHOR πŸ‘‘

Microsoft


Copyright (c) Microsoft Corporation. All rights reserved.


okay that's the whole page bestie, go forth and check those priorities 🫢

mwah πŸ’‹ this was pg_autoctl get node candidate-priority, version 2.2, dated Apr 07, 2025, part of the pg_auto_failover family β€” ily, bye!! πŸŒΈβœ¨πŸ’–

πŸ“¦ where this page comes from