Managing an Advanced Server installation v13
Unless otherwise noted, the commands and paths noted in the following section assume that you have performed an installation using the native packages.
Starting and stopping Advanced Server and supporting components
A service is a program that runs in the background and requires no user interaction (in fact, a service provides no user interface); a service can be configured 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 Advanced Server supporting components are services.
The following table lists the names of the services that control Advanced Server and services that control Advanced Server supporting components:
Advanced Server Component Name | Linux Service Name | Debian Service Name |
---|---|---|
Advanced Server | edb-as-13 | edb-as@13-main |
pgAgent | edb-pgagent-13 | edb-as13-pgagent |
PgBouncer | edb-pgbouncer-1.14 | edb-pgbouncer114 |
pgPool-II | edb-pgpool-4.1 | edb-pgpool41 |
Slony | edb-slony-replication-13 | edb-as13-slony-replication |
EFM | edb-efm-4.0 | edb-efm-4.0 |
You can use the Linux command line to control Advanced Server's database server and the services of Advanced Server's supporting components. The commands that control the Advanced Server service on a Linux platform are host specific.
Controlling a service on RHEL/Rocky Linux/AlmaLinux 8.x
If your installation of Advanced Server resides on RHEL/Rocky Linux/AlmaLinux 8.x, you must use the systemctl
command to control the Advanced Server service and supporting components.
The systemctl
command must be in your search path and must be invoked with superuser privileges. To use the command, open a command line, and 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 Ubuntu 20.04
If your installation of Advanced Server resides on version 20.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 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. To invoke the utility, assume the identity of the cluster owner, navigate into the home directory of Advanced Server, and issue the command:
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 aSIGHUP
signal, reloading configuration parametersstatus
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 official PostgreSQL Core Documentation.
Choosing Between pg_ctl and the service Command
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.
Configuring component services to AutoStart at System Reboot
After installing, configuring, and starting the services of Advanced Server supporting components on a Linux system, you must manually configure your system to autostart the service when your system reboots. To configure a service to autostart on a Linux system, open a command line, assume superuser privileges, and enter the following command.
On a Redhat-compatible Linux system, enter: