PG_AUTOCTL_SET_FORMATION_NUMBER-SYNC-STANDBYS(1)
π 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 variablePGDATA. and hey, use--monitorif you wanna connect to a monitor from anywhere, instead of the monitor URI that a local Postgres node managed withpg_autoctlis using. main character flexibility π--jsonβ output JSON formatted data. slay, machine-readable β¨--formationβ show replication settings for the given formation. defaults todefault.
β¨ ENVIRONMENT β¨
PGDATAβ Postgres directory location. can be used 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 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
- fedora 43: pg_auto_failover 2.1-6.fc42 Β· Apache-1.0
- fedora 44: pg_auto_failover 2.1-6.fc42 Β· Apache-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms