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 variablePGDATA. and psst β use--monitorto connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed withpg_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--pgdataoption, iconic behavior honestly β¨PG_AUTOCTL_MONITORβ Postgres URI to connect to the monitor node, and yep, it can be used instead of the--monitoroption π«XDG_CONFIG_HOMEβ thepg_autoctlcommand stores its configuration files in the standard placeXDG_CONFIG_HOME. see the XDG Base Directory Specification πXDG_DATA_HOMEβ thepg_autoctlcommand stores its internal states files in the standard placeXDG_DATA_HOME, which defaults to~/.local/share. see the XDG Base Directory Specification π
π AUTHOR π
Microsoft
π COPYRIGHT π
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
- debian trixie: pg-auto-failover-cli 2.2-2 Β· PostgreSQL
- ubuntu questing: pg-auto-failover-cli 2.2-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms