POSTGRESQL-SETUP(1)
π POSTGRESQL-SETUP(1) π
okay bestie, welcome to the postgresql-setup manual page, section 1 of the user commands, brought to you by postgresql-setup version 8.12 β¨ this is the girlies' guide to not tanking your database cluster, and I'm gonna hold your hand through every single flag, no cap π«Ά
πΈ SYNOPSIS πΈ
postgresql-setup MODE_OPTION [--unit=UNIT_NAME] [OPTION...]
π DESCRIPTION π
So this script? It's literally built to help sysadmins with basic database cluster administration π
it's giving "your cool older cousin who knows bash". Most of the time you're not gonna need anything fancy β postgresql-setup --initdb and postgresql-setup --upgrade is enough, periodt. But there are other options, and yes we're describing every single one of them below because that's the vibe π
If you want more info and the whole how/when to use this script situation, go read the documentation file at /usr/share/doc/postgresql18/README.rpm-dist π iykyk.
β¨ Available operation mode: β¨
--initdbβ Initialize a new PostgreSQL database cluster π£ this is usually the very first action you perform after installing the PostgreSQL server. First day of school energy fr.--upgradeβ Upgrade your database cluster for a new major version of the PostgreSQL server π¦ check out the--upgrade-fromoption for more info, she's got the details.
π OPTIONS π
--unit=UNIT_NAMEβ The UNIT_NAME is used to select the proper unit configuration (and yes, "unit" == service or initscript name on non-systemd systems, we're inclusive here). For example, if you want to work with a unit calledpostgresql@com_example.service, you should passpostgresql@com_exampleβ without the trailing.servicestring, bestie, don't leave it on. When no UNIT_NAME is explicitly passed, thepostgresqlstring is used by default π--port=PORTβ the port where the initialized server will listen for connections π‘--datadirβ Override the automatic detection of the PostgreSQL data directory. Heads up though: if your system is using systemd as its init system, it is advisable to change the data directory path in the service file instead π«Ά (do it the systemd way, she said so).--upgrade-from-unit=UNITβ Select the proper unit name to upgrade from. This has similar semantics as the--unitoption π same energy, different direction.--upgrade-idsβ Print the list of available IDs of upgrade scenarios to standard output π so you can see what your options are.--upgrade-from=IDβ Specify the id of the "old" postgresql stack to upgrade from. You can list the available IDs with--upgrade-ids. Default ispostgresqlβ--data-checksumsβ Enable data checksums for the data directory. And if you're upgrading? They will be enabled before performing the upgrade π₯ safety first, always.
π Other options: π
--helpβ show this help π--versionβ show the version of this package π·οΈ--debugβ show basic debugging information π
π¦ ENVIRONMENT π¦
PGSETUP_INITDB_OPTIONSβ Options carried by this variable are passed to the subsequent call of theinitdbbinary (peepman initdb(1)for that one). This variable is used also during'upgrade'mode, because the new cluster is actually re-initialized from the old one π yep, that's the twist.PGSETUP_PGUPGRADE_OPTIONSβ Options in this variable are passed next to the subsequent call ofpg_upgrade. For more info about possible options, please look atman pg_upgrade(1)πPGSETUP_DEBUGβ Set this to'1'if you want to see very verbose shell debugging output π it's a lot. it's so much. but it's there if you need it.
π little note that lives down here: this was Built against PostgreSQL version 18.6.
π SEE YOU LATER, BESTIE π
That's the whole page! This cutie is postgresql-setup version 8.12, and the page itself is dated August 2026 β so go init that cluster, go upgrade that cluster, and remember: checksums before upgrade, .service never in your unit name, and always read the README.rpm-dist π mwah, bye! πβ¨
π¦ where this page comes from
- fedora 43: postgresql-server 18.6-1.fc43 Β· PostgreSQL
- fedora 43: postgresql-server 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-server 18.6-1.fc44 Β· PostgreSQL
- fedora 44: postgresql-server 18.6-1.fc44 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms