pgagroal-cli(1)

πŸ’– pgagroal-cli πŸ’–

okay bestie, say hi to pgagroal-cli, the command line utility for pgagroal β€” it lives in the General Commands Manual section of the manual pages, and it's literally your little remote control for the pooler. πŸŽ€


✨ SYNOPSIS ✨

pgagroal-cli [ -c CONFIG_FILE ] [ COMMAND ]

🌸 DESCRIPTION 🌸

pgagroal-cli is a command line utility for pgagroal. that's the whole vibe fr fr β€” it's the CLI bestie that talks to your pooler so you don't have to. πŸ¦‹


πŸ’… OPTIONS πŸ’…

these are the flags, no cap:

  • -c,--config CONFIG_FILE β€” sets the path to the pgagroal.conf file
  • -h,--host HOST β€” sets the host name
  • -p,--port PORT β€” sets the port number
  • -U,--user USERNAME β€” sets the user name
  • -P,--password PASSWORD β€” sets the password
  • -L,--logfile FILE β€” sets the logfile
  • -F, --format text|json|raw β€” sets the output format
  • -C, --compress none|gz|zstd|lz4|bz2 β€” compresses the wire protocol
  • -E, --encrypt none|aes|aes256|aes192|aes128 β€” encrypts the wire protocol
  • -v, --verbose β€” outputs a text string of the result
  • -V, --version β€” displays version information
  • -?, --help β€” displays help

πŸ‘‘ COMMANDS πŸ‘‘

🌈 flush [mode] [database]

flushes connections according to [mode]. the allowed modes are:

  • 'gracefully' (default) β€” flushes all connections gracefully πŸ’–
  • 'idle' β€” flushes only idle connections 😴
  • 'all' β€” flushes all connections. USE WITH CAUTION! πŸ’€

if no [database] name is specified, it applies to all databases.

🌈 ping

verifies if pgagroal is up and running, and checks connectivity to the configured PostgreSQL servers. with JSON output, the response includes per-server Host, Port, Status, Primary, and Behind on standbys. πŸ‘‘

🌈 enable [database]

enables the specified database, or all databases if none is specified ✨

🌈 disable [database]

disables the specified database, or all databases if none is specified πŸ™ˆ

🌈 shutdown [mode]

stops the pgagroal pooler. the [mode] can be:

  • 'gracefully' (default): waits for active connections to quit 🫢
  • 'immediate': forces connections to close and terminate πŸ’₯
  • 'cancel': avoids a previously issued 'shutdown gracefully' πŸ›‘

🌈 status [details]

status of pgagroal, with optional details. per-server fields match ping. details adds limits and per-connection rows. πŸ”

🌈 switch-to <server>

switches to the specified primary server πŸ”„

🌈 conf <action>

manages the configuration. <action> can be:

  • 'reload': issues a configuration reload πŸ”
  • 'ls': lists the configuration files used πŸ“‹
  • 'get': obtains information about a runtime configuration value β€” usage: conf get <parameter_name> πŸ‘€
  • 'set': modifies a configuration value β€” usage: conf set <parameter_name> <parameter_value> ✍️

🌈 clear <what>

resets either the Prometheus statistics or the specified server. <what> can be:

  • 'server' (default) followed by a server name πŸ–₯️
  • a server name on its own 🏷️
  • 'prometheus' to reset the Prometheus metrics πŸ“Š

😭 REPORTING BUGS 😭

pgagroal is licensed under the 3-clause BSD License.


🫢 SEE ALSO 🫢

pgagroal.conf(5), pgagroal_hba.conf(5), pgagroal_databases.conf(5), pgagroal_vault.conf(5), pgagroal(1), pgagroal-admin(1), pgagroal-vault(1)


and that's the whole page, bestie β€” this was pgagroal-cli(1) from the General Commands Manual, mwah πŸ’‹ slay, go flush something (gracefully, obviously) πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from