PG_AUTOCTL_STOP(1)

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

πŸ’– PG_AUTOCTL STOP(1) πŸ’–

okay bestie, so this is the pg_autoctl stop page from the pg_auto_failover manual, and it's genuinely so simple it's iconic. two names for the same energy:

  • pg_autoctl stop β€” pg_autoctl stop
  • pg_autoctl stop β€” signal the pg_autoctl service for it to stop

✨ SYNOPSIS ✨

This command stops the processes you need to run a monitor node or a keeper node, and which one it stops depends on the configuration file that belongs to the --pgdata option or the PGDATA environment variable. it just knows. main character detective energy πŸ”

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 the process. very "i'm not mad i'm just sending a signal" of it πŸ’…

When pg_autoclt receives a shutdown signal, a shutdown sequence is triggered. Depending on which signal it got, an operation that's already been started (like a state transition) is either run to completion, stopped at the next opportunity, or stopped immediately even when it's in the middle of the transition. so like... it might finish its sentence, or it might just leave mid-text. depends on the vibe of the signal πŸ¦‹


πŸŽ€ OPTIONS πŸŽ€

  • --pgdata β€” location of the Postgres node being managed locally. Defaults to the environment variable PGDATA. Also: use --monitor to connect to a monitor from anywhere, rather than the monitor URI used by a local Postgres node managed with pg_autoctl.
  • --fast β€” Fast Shutdown mode for pg_autoctl. Sends the SIGINT signal to the running service, which is the same as using C-c on an interactive process running as a foreground shell job. yes it's literally the ctrl-c experience, no cap 😭
  • --immediate β€” Immediate Shutdown mode for pg_autoctl. Sends the SIGQUIT signal to the running service. it's giving no patience whatsoever.

🧚 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.


okay that's the whole page, you ate it, go stop some services responsibly 🫢

this was pg_auto_failover, version 2.1, dated Jan 18, 2025 β€” mwah, bye bestie! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from