pg_ctl

Utility for controlling a PostgreSQL server and database cluster. More information: <https://www.postgresql.org/docs/current/app-pg-ctl.html>.

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
Windows (WSL2)
sudo apt-get update sudo apt-get install postgresql-9.3-dbg
Raspbian
apt-get install postgresql-9.5

Utility for controlling a PostgreSQL server and database cluster. More information: <https://www.postgresql.org/docs/current/app-pg-ctl.html>.

  • Initialize a new PostgreSQL database cluster:
    pg_ctl -D data_directory init
  • Start a PostgreSQL server:
    pg_ctl -D data_directory start
  • Stop a PostgreSQL server:
    pg_ctl -D data_directory stop
  • Restart a PostgreSQL server:
    pg_ctl -D data_directory restart
  • Reload the PostgreSQL server configuration:
    pg_ctl -D data_directory reload

© tl;dr; authors and contributors