pg_ctl

Utility for controlling a PostgreSQL server and database cluster.

Install

All systems
curl cmd.cat/pg_ctl.sh
Debian Debian
apt-get install postgresql-9.1-dbg
Ubuntu
apt-get install postgresql-9.3-dbg
Arch Arch Linux
pacman -S postgresql-old-upgrade
image/svg+xml Kali Linux
apt-get install postgresql-11
CentOS
yum install postgresql-upgrade
Fedora
dnf install postgresql-upgrade
Raspbian
apt-get install postgresql-9.5

Utility for controlling a PostgreSQL server and database cluster.

  • Start a PostgreSQL server:
    pg_ctl -D data_directory -l log_file_name
  • Initialize a PostgreSQL database cluster:
    pg_ctl -D data_directory init
  • Stop a PostgreSQL server:
    pg_ctl -D data_directory stop
  • Restart a PostgreSQL server:
    pg_ctl -D data_directory restart

© tl;dr; authors and contributors