table of contents
POSTGRESQL-SETUP(1) | User Commands | POSTGRESQL-SETUP(1) |
NAME¶
postgresql-setup - manual page for postgresql-setup 8.9~dev
SYNOPSIS¶
postgresql-setup MODE_OPTION [--unit=UNIT_NAME] [OPTION...]
DESCRIPTION¶
Script is aimed to help sysadmin with basic database cluster administration. Usually, "postgresql-setup --initdb" and "postgresql-setup --upgrade" is enough, however there are other options described below.
For more info and howto/when use this script please look at the documentation file /usr/share/doc/postgresql/README.rpm-dist.
Available operation mode:¶
OPTIONS¶
- --unit=UNIT_NAME
- The UNIT_NAME is used to select proper unit configuration (unit == service or initscript name on non-systemd systems). For example, if you want to work with unit called 'postgresql@com_example.service', you should use 'postgresql@com_example' (without trailing .service string). When no UNIT_NAME is explicitly passed, the 'postgresql' string is used by default.
- --port=PORT
- port where the initialized server will listen for connections
- --new-systemd-unit
- We dropped this option for security reasons. Nowadays, please use the root-only script /usr/sbin/postgresql-new-systemd-unit.
- --datadir
- Dropped with --new-systemd-unit.
- --upgrade-from-unit=UNIT
- Select proper unit name to upgrade from. This has similar semantics as --unit option.
- --upgrade-ids
- Print list of available IDs of upgrade scenarios to standard output.
- --upgrade-from=ID
- Specify id "old" postgresql stack to upgrade from. List of available IDs can be listed by --upgrade-ids. Default is 'postgresql'.
Other options:¶
ENVIRONMENT¶
- PGSETUP_INITDB_OPTIONS
- Options carried by this variable are passed to subsequent call of `initdb` binary (see man initdb(1)). This variable is used also during 'upgrade' mode because the new cluster is actually re-initialized from the old one.
- PGSETUP_PGUPGRADE_OPTIONS
- Options in this variable are passed next to the subsequent call of `pg_upgrade`. For more info about possible options please look at man pg_upgrade(1).
- PGSETUP_DEBUG
- Set to '1' if you want to see very verbose shell debugging output.
Built against PostgreSQL version 16.1.
April 2024 | postgresql-setup 8.9~dev |