PG_AUTOCTL ENABLE SECONDARY(1)
π PG_AUTOCTL ENABLE SECONDARY π
okay bestie, welcome to the pg_autoctl enable secondary page from the pg_auto_failover manual β¨ this one's short and sweet and it's literally just about flipping the secondary switch on a formation, so let's get into it π«Ά
β¨ NAME β¨
pg_autoctl enable secondary β pg_autoctl enable secondary
pg_autoctl enable secondary β Enable secondary nodes on a formation π
πΈ SYNOPSIS πΈ
ngl this feature makes the most sense when you're running the Enterprise Edition of pg_auto_failover, because that edition is fully compatible with Citus formations π
so here's the tea on how it behaves:
- when secondary is enabled β the Citus workers creation policy is to assign a primary node then a standby node for each group π
- when secondary is disabled β the Citus workers creation policy is to assign only the primary nodes π
the usage line, verbatim, no cap:
usage: pg_autoctl enable secondary [ --pgdata --formation ]
--pgdata path to data directory
--formation Formation to enable secondary on
β OPTIONS β
--pgdataβ the location of the Postgres node being managed locally π it defaults to the environment variablePGDATA. and bestie, use--monitorif you wanna connect to a monitor from anywhere, instead of using the monitor URI that a local Postgres node managed withpg_autoctlwould use β¨--formationβ the target formation where you wanna enable the secondary feature π―
π ENVIRONMENT π
PGDATAβ Postgres directory location. you can use this instead of the--pgdataoption πPG_AUTOCTL_MONITORβ Postgres URI to connect to the monitor node, 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 vibe, bestie π¦ this was version 2.2, dated Apr 07, 2025, brought to you by the fine folks at pg_auto_failover β slay, go enable some secondaries, and don't forget to read the rest of the manual, iykyk π β¨π
π¦ 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