Starting and stopping services v16
A service is a program that runs in the background and doesn't require user interaction. A service has no user interface. You can configure a service to start at boot time or manually on demand. Services are best controlled using the platform-specific operating system service control utility. Many of the EDB Postgres Advanced Server supporting components are services.
List of services
The following table lists the names of the services that control EDB Postgres Advanced Server and services that control EDB Postgres Advanced Server supporting components.
EDB Postgres Advanced Server component name | Linux service name | Debian service name |
---|---|---|
EDB Postgres Advanced Server | edb-as-16 | edb-as@16-main |
pgAgent | edb-pgagent-16 | edb-as16-pgagent |
PgBouncer | edb-pgbouncer-1.21 | edb-pgbouncer121 |
pgPool-II | edb-pgpool-4.4 | edb-pgpool44 |
Slony | edb-slony-replication-15 | edb-as15-slony-replication |
EFM | edb-efm-4.0 | edb-efm-4.0 |
You can use the Linux command line to control the EDB Postgres Advanced Server database server and the services of EDB Postgres Advanced Server's supporting components. The commands that control the EDB Postgres Advanced Server service on a Linux platform are host specific.
Controlling a service on RHEL/Rocky Linux/AlmaLinux 8.x | 9.x
If your installation of EDB Postgres Advanced Server resides on version 8.x | 9.x of RHEL, you must use the systemctl
command to control the EDB Postgres Advanced Server service and supporting components.
The systemctl
command must be in your search path, and you must invoke it with superuser privileges. To use the command, at the command line, enter:
Where:
service_name
specifies the name of the service.
action
specifies the action taken by the service command. Specify:
start
to start the service.stop
to stop the service.restart
to stop and then start the service.status
to discover the current status of the service.
Controlling a service on Debian 11.x or Ubuntu 20.04 | 22.04
If your installation of EDB Postgres Advanced Server resides on version 11.x of Debian or 20.04 | 22.04 of Ubuntu, assume superuser privileges and invoke the following commands using bundled scripts to manage the service. Use the following commands to:
Discover the current status of a service:
Stop a service:
Restart a service:
Reload a service:
Control the component services:
Using pg_ctl to control EDB Postgres Advanced Server
You can use the pg_ctl utility to control an EDB Postgres Advanced Server service from the command line on any platform. pg_ctl allows you to:
- Start, stop, or restart the EDB Postgres Advanced Server database server
- Reload the configuration parameters
- Display the status of a running server
To invoke the utility, assume the identity of the cluster owner. In the home directory of EDB Postgres Advanced Server, enter:
data_directory
is the location of the data controlled by the EDB Postgres 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
to send the server aSIGHUP
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, see the PostgreSQL core documentation.
Choosing between pg_ctl and the service command
You can use the pg_ctl utility to manage the status of an EDB Postgres Advanced Server cluster. However, it's important to know that pg_ctl doesn't alert the operating system service controller to changes in the status of a server. We recommend using the service
command when possible.
Configuring component services to autostart at system reboot
After installing, configuring, and starting the services of EDB Postgres Advanced Server supporting components on a Linux system, you must manually configure your system to autostart the service when your system restarts. To configure a service to autostart on a Linux system, at the command line, assume superuser privileges, and enter the command.
On a Redhat-compatible Linux system, enter:
Where service_name
specifies the name of the service.