5.2.3 Using pg_ctl to Control Advanced Server

Table of Contents Previous Next


5 Managing an Advanced Server Installation : 5.2 Controlling a Service on Linux : 5.2.3 Using pg_ctl to Control Advanced Server

You can use the pg_ctl utility to control an Advanced Server service from the command line on any platform. pg_ctl allows you to start, stop, or restart the Advanced Server database server, reload the configuration parameters, or display the status of a running server. You can invoke the utility with the command:
pg_ctl -D data_directory action
data_directory is the location of the data controlled by the Advanced Server cluster.
action specifies the action taken by the pg_ctl utility. Specify:
start to start the service.
stop to stop the service.
restart to stop and then start the service.
reload sends the server a SIGHUP signal, reloading configuration parameters
status to discover the current status of the service.
For more information about using the pg_ctl utility, or the command line options available, please see the official PostgreSQL core documentation, available at:
You can use the pg_ctl utility to manage the status of an Advanced Server cluster, but it is important to note that pg_ctl does not alert the operating system service controller to changes in the status of a server, so it is beneficial to use the service command whenever possible.
Note that when you invoke the installer with the --extract-only option, the installer does not create a service, it merely unpacks the server. If you have installed Advanced Server by invoking the installer with the --extract-only option, and not completed the installation with the installation script (runAsRoot.sh or runAsAdmin.sh) you must use the pg_ctl command to control the server.

5 Managing an Advanced Server Installation : 5.2 Controlling a Service on Linux : 5.2.3 Using pg_ctl to Control Advanced Server

Table of Contents Previous Next