PG_AUTOCTL DISABLE SECONDARY(1)

✨ pg_autoctl disable secondary ✨

okay bestie, welcome to the pg_autoctl disable secondary page πŸ’– this one lives in the pg_auto_failover manual, and it's a short one β€” but it's a mighty one, fr fr.


🌸 NAME 🌸

pg_autoctl disable secondary β€” literally just pg_autoctl disable secondary

and also, like, the whole point: pg_autoctl disable secondary β€” turn off secondary nodes on a formation πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the tea, and I need you to lock in for a sec: this feature makes the most sense when you're using the Enterprise Edition of pg_auto_failover, which is fully compatible with Citus formations, no cap πŸ‘‘

so when secondaries are disabled, the Citus workers creation policy is to assign a primary node then a standby node for each group.

and when secondary is disabled, the Citus workers creation policy is to assign only the primary nodes. that's it, that's the whole vibe shift πŸ’…

usage: pg_autoctl disable secondary  [ --pgdata --formation ]

--pgdata      path to data directory
--formation   Formation to disable secondary on

πŸ’œ OPTIONS πŸ’œ

  • --pgdata β€” where's your Postgres node at, bestie? this is the location of the Postgres node being managed locally. defaults to the environment variable PGDATA. and psst β€” use --monitor to connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed with pg_autoctl. 🫢
  • --formation β€” the target formation where you wanna disable the secondary feature. that's it. that's the one job 🎯

🌈 ENVIRONMENT 🌈

  • PGDATA β€” Postgres directory location. you can use this instead of the --pgdata option, iconic behavior honestly ✨
  • PG_AUTOCTL_MONITOR β€” Postgres URI to connect to the monitor node, and yep, it 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 πŸ“

πŸ‘‘ AUTHOR πŸ‘‘

Microsoft


Copyright (c) Microsoft Corporation. All rights reserved.


and that's the whole page, bestie!! πŸ¦‹ you read it, you understood it, you're basically a pg_auto_failover main character now. this was version 2.2, dated Apr 07, 2025, from the pg_auto_failover manual β€” slay, ate, periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from