PG_AUTOCTL STOP(1)
PG_AUTOCTL STOP(1) π
okay bestie, so this one lives in the pg_auto_failover manual, and it's literally called pg_autoctl stop. Yeah. That's the whole name. Iconic minimalism honestly.
β¨ NAME β¨
pg_autoctl stop β pg_autoctl stop
pg_autoctl stop β signal the pg_autoctl service for it to stop π
πΈ SYNOPSIS πΈ
So basically this command stops the processes you need to run a monitor node or a keeper node β which one it goes for depends on the configuration file that belongs to the --pgdata option or the PGDATA environment variable. no cap.
usage: pg_autoctl stop [ --pgdata --fast --immediate ]
--pgdata path to data directory
--fast fast shutdown mode for the keeper
--immediate immediate shutdown mode for the keeper
π¦ DESCRIPTION π¦
The pg_autoctl stop command goes and finds the PID of the running service for whatever --pgdata you gave it, and if that process is still running, it sends a SIGTERM signal to it. that's it. that's the move. π
When pg_autoclt receives a shutdown signal, a shutdown sequence gets triggered. And depending on which signal it received, an operation that's already been started (like, say, a state transition) is either:
- run to completion π
- stopped as the next opportunity comes up βΈοΈ
- or stopped immediately, even when it's mid-transition π
so yeah, the signal you pick genuinely changes the vibe of the shutdown. choose wisely bestie.
π 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.--fastβ Fast Shutdown mode forpg_autoctl. Sends theSIGINTsignal to the running service, which is the same as usingC-con an interactive process running as a foreground shell job. β¨--immediateβ Immediate Shutdown mode forpg_autoctl. Sends theSIGQUITsignal to the running service. π«’
π 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.
okay that's the whole thing, you ate it, go stop your nodes responsibly π
this was version 2.2, dated Apr 07, 2025 β pg_autoctl stop, signing off π«ΆπΈ
π¦ 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