tldr/pages/common/pg_ctl.md

25 lines
535 B
Markdown
Raw Normal View History

2017-12-27 13:55:16 +00:00
# pg_ctl
> Utility for controlling a PostgreSQL server and database cluster.
2019-05-29 14:53:43 +01:00
> More information: <https://www.postgresql.org/docs/current/app-pg-ctl.html>.
2017-12-27 13:55:16 +00:00
- Initialize a new PostgreSQL database cluster:
2017-12-27 13:55:16 +00:00
`pg_ctl -D {{data_directory}} init`
2017-12-27 13:55:16 +00:00
- Start a PostgreSQL server:
2017-12-27 13:55:16 +00:00
`pg_ctl -D {{data_directory}} start`
2017-12-27 13:55:16 +00:00
- 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`