PG_AUTOCTL_SET_FORMATION_NUMBER-SYNC-STANDBYS(1)

πŸ“¦
version 2.1 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– pg_autoctl set formation number-sync-standbys πŸ’–

okay bestie, so this is a page from the pg_auto_failover manual, section 1, and it's all about the pg_autoctl set formation number-sync-standbys command. it's giving "i just wanna tell my monitor how many sync standbys i want" energy. let's go πŸ’…


✨ NAME ✨

pg_autoctl set formation number-sync-standbys β€” literally just pg_autoctl set formation number-sync-standbys

pg_autoctl set formation number-sync-standbys β€” set number_sync_standbys for a formation from the monitor πŸŽ€


✨ SYNOPSIS ✨

this command sets the pg_autoctl replication settings for the number of sync standbys, no cap:

usage: pg_autoctl set formation number-sync-standbys  [ --pgdata ] [ --json ] [ --formation ] <number_sync_standbys>

--pgdata      path to data directory
--formation   pg_auto_failover formation
--json        output data in the JSON format

✨ DESCRIPTION ✨

the pg_auto_failover monitor is so responsible, it makes sure that at least N+1 candidate standby nodes are registered when number-sync-standbys is N. so if you wanna run the command below, you need at least 3 standby nodes with a non-zero candidate priority registered to the monitor. not negotiable, fr fr 😌

$ pg_autoctl set formation number-sync-standbys 2

also check out pg_autoctl show settings for the full list of replication settings πŸ‘‘ (iykyk)


✨ OPTIONS ✨

  • --pgdata β€” where your local Postgres node lives, the location of the data directory being managed locally. defaults to the environment variable PGDATA. and hey, use --monitor if you wanna connect to a monitor from anywhere, instead of the monitor URI that a local Postgres node managed with pg_autoctl is using. main character flexibility πŸ’…
  • --json β€” output JSON formatted data. slay, machine-readable ✨
  • --formation β€” show replication settings for the given formation. defaults to default.

✨ ENVIRONMENT ✨

  • PGDATA β€” Postgres directory location. can be used 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 page bestie, you ate it πŸ’–

this was pg_autoctl manual version 2.1, dated Jan 18, 2025, from the pg_auto_failover girls. periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from