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 variable PGDATA. and bestie, use --monitor if you wanna connect to a monitor from anywhere, instead of using the monitor URI that a local Postgres node managed with pg_autoctl would use ✨
  • --formation β€” the target formation where you wanna enable the secondary feature 🎯

🌈 ENVIRONMENT 🌈

  • PGDATA β€” Postgres directory location. you can use this instead of the --pgdata option πŸ’–
  • PG_AUTOCTL_MONITOR β€” Postgres URI to connect to the monitor node, 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 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