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

NAME

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

ENVIRONMENT

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