1POSTGRESQL-SETUP(1)              User Commands             POSTGRESQL-SETUP(1)
2
3
4

NAME

6       postgresql-setup - manual page for postgresql-setup 8.8
7

SYNOPSIS

9       postgresql-setup MODE_OPTION [--unit=UNIT_NAME] [OPTION...]
10

DESCRIPTION

12       Script  is  aimed to help sysadmin with basic database cluster adminis‐
13       tration.  Usually, "postgresql-setup  --initdb"  and  "postgresql-setup
14       --upgrade" is enough, however there are other options described below.
15
16       For  more  info and howto/when use this script please look at the docu‐
17       mentation file /usr/share/doc/postgresql/README.rpm-dist.
18
19   Available operation mode:
20       --initdb
21              Initialize new PostgreSQL database cluster.  This is usually the
22              first action you perform after PostgreSQL server installation.
23
24       --upgrade
25              Upgrade  database  cluster  for  new major version of PostgreSQL
26              server.  See the --upgrade-from option for more info.
27

OPTIONS

29       --unit=UNIT_NAME
30              The UNIT_NAME is used to select proper unit configuration  (unit
31              ==  service or initscript name on non-systemd systems).  For ex‐
32              ample, if you want to work with unit called  'postgresql@com_ex‐
33              ample.service', you should use 'postgresql@com_example' (without
34              trailing .service string).   When  no  UNIT_NAME  is  explicitly
35              passed, the 'postgresql' string is used by default.
36
37       --port=PORT
38              port where the initialized server will listen for connections
39
40       --new-systemd-unit
41              We  dropped  this option for security reasons.  Nowadays, please
42              use the root-only script /usr/sbin/postgresql-new-systemd-unit.
43
44       --datadir
45              Dropped with --new-systemd-unit.
46
47       --upgrade-from-unit=UNIT
48              Select proper unit name to upgrade from.  This has  similar  se‐
49              mantics as --unit option.
50
51       --upgrade-ids
52              Print  list  of  available  IDs of upgrade scenarios to standard
53              output.
54
55       --upgrade-from=ID
56              Specify id "old" postgresql stack  to  upgrade  from.   List  of
57              available IDs can be listed by --upgrade-ids.  Default is 'post‐
58              gresql'.
59
60   Other options:
61       --help show this help
62
63       --version
64              show version of this package
65
66       --debug
67              show basic debugging information
68

ENVIRONMENT

70       PGSETUP_INITDB_OPTIONS
71              Options carried by this variable are passed to  subsequent  call
72              of  `initdb`  binary (see man initdb(1)).  This variable is used
73              also during 'upgrade' mode because the new cluster  is  actually
74              re-initialized from the old one.
75
76       PGSETUP_PGUPGRADE_OPTIONS
77              Options  in this variable are passed next to the subsequent call
78              of `pg_upgrade`.  For more info about  possible  options  please
79              look at man pg_upgrade(1).
80
81       PGSETUP_DEBUG
82              Set  to '1' if you want to see very verbose shell debugging out‐
83              put.
84
85       Built against PostgreSQL version 15.4.
86
87
88
89postgresql-setup 8.8              August 2023              POSTGRESQL-SETUP(1)
Impressum