POSTGRESQL-SETUP(1) Postgresql RPM-dist manual POSTGRESQL-SETUP(1)NAME
postgresql-setup - manual page for postgresql-setup 9.2.7
SYNOPSIS
postgresql-setup {initdb|upgrade} [SERVICE_NAME]
DESCRIPTION
Script is aimed to help sysadmin with basic database cluster administration.
The SERVICE_NAME is used for selection of proper unit configuration file; For more info and howto/when use this script please look at the
docu file /usr/share/doc/postgresql-9.2.7/README.rpm-dist. The 'postgresql' string is used when no SERVICE_NAME is explicitly passed.
Available operation mode:
initdb Create a new PostgreSQL database cluster. This is usually the first action you perform after PostgreSQL server installation.
upgrade
Upgrade PostgreSQL database cluster to be usable with new server. Use this if you upgraded your PostgreSQL server to newer major
version (currently from 8.4 to 9.2).
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 debugging output.
postgresql-setup 9.2.7 June 2014 POSTGRESQL-SETUP(1)
Check Out this Related Man Page
PG_WRAPPER(1) Debian PostgreSQL infrastructure PG_WRAPPER(1)NAME
pg_wrapper - wrapper for PostgreSQL client commands
SYNOPSIS
client-program [--cluster version/cluster] [...]
(client-program: psql, createdb, dropuser, and all other client programs installed in /usr/lib/postgresql/version/bin).
DESCRIPTION
This program is run only as a link to names which correspond to PostgreSQL programs in /usr/lib/postgresql/version/bin. It determines the
configured cluster and database for the user and calls the appropriate version of the desired program to connect to that cluster and
database, supplying any specified options to that command.
The target cluster is selected by the following means, in descending order of precedence:
1. explicit specification with the --host option
2. explicit specification with the --cluster option
3. if the PGHOST environment variable is set, no further cluster selection is performed. The default PostgreSQL version and port number
(from the command line, the environment variable PGPORT, or default 5432) will be used.
4. explicit specification with the PGCLUSTER environment variable
5. matching entry in ~/.postgresqlrc (see postgresqlrc(5)), if that file exists
6. matching entry in /etc/postgresql-common/user_clusters (see user_clusters(5)), if that file exists
7. If only one local cluster exists, that one will be selected.
8. If several local clusters exist, the one listening on the default port 5432 will be selected.
If none of these rules match, pg_wrapper aborts with an error.
OPTIONS --cluster version/cluster
cluster is either the name of a local cluster, or takes the form host:port for a remote cluster. If port is left empty (i. e. you just
specify host:), it defaults to 5432.
ENVIRONMENT
PGCLUSTER
If $PGCLUSTER is set, its value (of the form version/cluster) specifies the desired cluster, similar to the --cluster option. However,
if --cluster is specified, it overrides the value of $PGCLUSTER.
PG_CLUSTER_CONF_ROOT
This specifies an alternative base directory for cluster configurations. This is usually /etc/postgresql/, but for testing/development
purposes you can change this to point to e. g. your home directory, so that you can use the postgresql-common tools without root
privileges.
FILES
/etc/postgresql-common/user_clusters
stores the default cluster and database for users and groups as set by the administrators.
$HOME/.postgresqlrc
stores defaults set by the user himself.
SEE ALSO user_clusters(5), postgresqlrc(5)AUTHOR
Martin Pitt <mpitt@debian.org>
Debian 2013-01-04 PG_WRAPPER(1)