PG_CLOUDCONFIG(1)

πŸ“¦ version 0.11, in ubuntu jammy

πŸ’– PG_CLOUDCONFIG πŸ’–

ok so bestie, welcome to pg_cloudconfig β€” it lives in the User Commands section of the manual, and it's the girl who sets up your PostgreSQL cluster with optimized defaults when you're running in a virtualized environment. let's get into it 🫢


✨ NAME ✨

pg_cloudconfig β€” set optimized defaults for PostgreSQL in virtualized environments πŸ¦‹


✨ DESCRIPTION ✨

ok so here's the usage, and yes it's giving "I contain multitudes":

usage: pg_cloudconfig [-h] [--max_connections MAX_CONNECTIONS]
                      [--pg_conf_dir PG_CONF_DIR] [--dynamic_only]
                      [--blacklist SETTING [SETTING ...]] [--debug] [-q] [--version]
                      pg_version pg_clustername

so what does she DO? she's the Tool to initially set optimized defaults for PostgreSQL in virtualized environments πŸ’…

and here's the part you need to know before you run it: Settings are changed without asking for confirmation. 😭 like. she does not ask. she does not check in. she just goes. no cap.

🌸 positional arguments:

  • pg_version β€” the version of the PostgreSQL cluster you want to tune
  • pg_clustername β€” the name of the PostgreSQL cluster you want to tune

🌸 optional arguments:

  • -h, --help β€” show this help message and exit, the classic
  • --max_connections MAX_CONNECTIONS β€” set the max_connections explicitly if needed
  • --pg_conf_dir PG_CONF_DIR β€” path to the dir holding the postgresql.conf (use this to override the default)
  • --dynamic_only β€” do not set static optimized defaults, only set values dynamic calculated
  • --blacklist SETTING [SETTING ...] β€” settings not to touch πŸ™ˆ (she respects boundaries, love that)
  • --debug β€” show debug messages
  • -q, --quiet β€” disable output
  • --version β€” show program's version number and exit

πŸŽ€ the important lore

ok so listen up:

  • pg_cloudconfig should be run as the same user as PostgreSQL. like. the same one. don't be cute about it.
  • pg_version and pg_clustername are used to choose a cluster.
  • it is assumed that the Debian / postgresql-common naming and configuration schema is used.
  • if that's not the case, --pg_conf_dir needs to be set.
  • pg_conftool is used to get/set settings.
  • and here's the honest part: this does not tune PostgreSQL for any specific workload. it only tries to set some optimized defaults based on a few input variables and simple rules. it's vibes-based tuning, not workload-based tuning, iykyk ⭐
not me warning you again but: settings get changed with no confirmation prompt. run it on purpose, not by accident πŸ’€

and that's the whole page bestie!! this was pg_cloudconfig 0.11, dated October 2019 β€” go forth and tune responsibly, mwah πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from