pg_ctlcluster - start/stop/restart/reload a PostgreSQL cluster
pg_ctlcluster [options] cluster-version cluster-name action
where action = start|stop|restart|reload|autovac-start|autovac-stop|autovac-restart
This program controls the postmaster server for a particular cluster. It essentially wraps the pg_ctl(1) command. It determines the cluster version and data path and calls the right version of pg_ctl with appropriate configuration parameters and paths.
You have to start this program as the user who owns the database cluster or as root.
/var/log/postgresql/postgresql-
cluster-version-
cluster-name.log
),
and a PostreSQL server process (postmaster(1)) is started on it. If the
package postgresql-contrib-version is installed, a pg_autovacuum
process is started as well (unless this gets disabled in
/etc/postgresql-common/autovacuum.conf
or a cluster-specific
autovacuum.conf
file). Please note that server version 8.1 and above does
internal autovacuuming. Exits with 0 on success, with 2 if the server is
already running, and with 1 on other failure conditions.
Stops the postmaster(1) server (and pg_autovacuum, if running) of the given cluster. By default, "smart" mode is used, which waits until all clients disconnected.
With the --force option the "fast" mode is used which rolls back all active transactions, disconnects clients immediately and thus shuts down cleanly. If that does not work, shutdown is attempted again in "immediate" mode, which can leave the cluster in an inconsistent state and thus will lead to a recovery run at the next start. If this still does not help, the postmaster process is killed. Exits with 0 on success, with 2 if the server is not running, and with 1 on other failure conditions. This mode should only be used when the machine is about to be shut down.
postmaster
process. It is
possible to specify -o multiple times. See postmaster(1) for a
description of valid options.
pg_ctl(1), pg_wrapper(1), pg_lsclusters(1), postmaster(1)
Martin Pitt <mpitt@debian.org>