PG_AUTOCTL DISABLE MAINTENANCE(1)
β¨ pg_autoctl disable maintenance β the "bestie come back online" button β¨
okay so this is pg_autoctl disable maintenance, from the pg_auto_failover era, and it's the other half of the maintenance story. This one is literally "Disable Postgres maintenance mode on this node" π
πΈ NAME πΈ
pg_autoctl disable maintenance β bestie, we're turning maintenance mode off.
pg_autoctl disable maintenance β Disable Postgres maintenance mode on this node.
π¦ SYNOPSIS π¦
A pg_auto_failover can be put to a maintenance state. The Postgres node is then still registered to the monitor, and is known to be unreliable until maintenance is disabled. A node in the maintenance state is not a candidate for promotion.
Typical use of the maintenance state include Operating System or Postgres reboot, e.g. when applying security upgrades.
usage: pg_autoctl disable maintenance [ --pgdata --allow-failover ]
--pgdata path to data directory
π OPTIONS π
--pgdataβ Location of the Postgres node being managed locally. Defaults to the environment variablePGDATA. Use--monitorto connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed withpg_autoctl.--formationβ Target formation where to disable secondary feature.
π 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.
π EXAMPLES π
no cap, this is the whole glow-up arc. watch node3 go from "maintenance, do not perceive me" to "secondary, thriving" πβ¨
$ pg_autoctl show state
Name | Node | Host:Port | LSN | Connection | Current State | Assigned State
------+-------+----------------+-----------+--------------+---------------------+--------------------
node1 | 1 | localhost:5501 | 0/4000810 | read-write | primary | primary
node2 | 2 | localhost:5502 | 0/4000810 | read-only | secondary | secondary
node3 | 3 | localhost:5503 | 0/4000810 | none | maintenance | maintenance
$ pg_autoctl disable maintenance --pgdata node3
12:06:37 47542 INFO Listening monitor notifications about state changes in formation "default" and group 0
12:06:37 47542 INFO Following table displays times when notifications are received
Time | Name | Node | Host:Port | Current State | Assigned State
---------+-------+-------+----------------+---------------------+--------------------
12:06:37 | node3 | 3 | localhost:5503 | maintenance | catchingup
12:06:37 | node3 | 3 | localhost:5503 | catchingup | catchingup
12:06:37 | node3 | 3 | localhost:5503 | catchingup | secondary
12:06:37 | node3 | 3 | localhost:5503 | secondary | secondary
$ pg_autoctl show state
Name | Node | Host:Port | LSN | Connection | Current State | Assigned State
------+-------+----------------+-----------+--------------+---------------------+--------------------
node1 | 1 | localhost:5501 | 0/4000848 | read-write | primary | primary
node2 | 2 | localhost:5502 | 0/4000848 | read-only | secondary | secondary
node3 | 3 | localhost:5503 | 0/4000000 | read-only | secondary | secondary
π AUTHOR π
Microsoft
β COPYRIGHT β
Copyright (c) Microsoft Corporation. All rights reserved.
okay and that's the whole page, bestie π«Ά go forth and un-maintenance your node, you absolute icon π
this was pg_autoctl disable maintenance, page 1 of 1, from version 2.2, dated Apr 07, 2025 β slay, mwah π β¨
π¦ 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