ADPG service actions

This article describes the actions available for the ADPG service.

Backup: Info

The Backup: Info action displays a list of cluster backups. The action is executed on behalf of the postgres user.

To view the result, open the Jobs page, click the Backup: Info row in the task list, switch to the Ansible [check] tab of the job, find the Check valid backup row, and click it to expand. Backups are grouped by node.

The result of the Backup: Info action
The result of the "Backup: Info" action

For more information on backups, see Backup and restore using pgBackRest.

Backup: Restore cluster

The Backup: Restore cluster action restores a cluster from the last backup on all nodes. The action is executed on behalf of the postgres user.

IMPORTANT
The Backup: Restore cluster action restores the cluster to the end of the WAL archive. In case of an accidental deletion of database objects, use manual PITR restore with the --target parameter, since it is most likely that the Backup: Restore Cluster action will restore the state of the cluster to the moment when the database objects were already deleted/dropped.

Backup: Start

The Backup: Start action allows you to create a cluster backup. The action is executed on behalf of the postgres user.

When you choose Backup: Start, ADCM displays a dialog window to specify settings for the action.

The Run an action: Backup: Start window
The "Run an action: Backup: Start" window

In the Run an action: Backup: Start dialog window, specify the Backup type parameter that determines what type of backup should be created. You can use the following values:

  • full backup — pgBackRest copies the entire contents of a cluster to the backup.

  • differential backup — pgBackRest only copies database files that have changed since the last full backup.

  • incremental backup — pgBackRest only copies database files that have changed since the last backup, which can be another incremental backup, a differential backup, or a full backup.

Check

The Check action verifies whether the settings of hosts, components, and related services match the requirements of the service, and whether the service itself works correctly.

You can find the action result and the process of its execution on the Jobs page.

The Check action result on the Jobs page
The "Check" action result on the "Jobs" page

Resume Cluster

The Resume Cluster action switches Patroni from the pause mode, brings the cluster to the working state, returns the control over the cluster to Patroni. The action also resolves the situation with several leaders if it occurs.

Use the Pause Cluster action to turn on Patroni pause mode.

Pause Cluster

The Pause Cluster action switches Patroni to the pause mode. In the pause mode, Patroni does not manage the cluster, but still saves the cluster state in DCS. The pause mode can be helpful during major version upgrades or corruption recovery. These actions often start and stop nodes for reasons unknown to Patroni. Some nodes can be even temporary promoted, breaking the assumption of running only one master. Therefore, Patroni needs to be able to stop controlling a running cluster.

Use the Resume Cluster action to switch off Patroni pause mode.

Expand

The Expand action adds new hosts to a service.

NOTE

If you use the Monitoring service, call the Reconfigure and restart action of the Monitoring service after the Expand action is finished to ensure that metrics are collected from added hosts.

When you choose Expand, ADCM displays a dialog window to specify settings for the action.

The Run an action window
The "Run an action" window

In the Run an action dialog window, you can choose whether ADCM reboots cluster servers after installation. Click Next to open the Host — Component tab where you can add cluster hosts to the component.

The Host - Component tab
The "Host — Component" tab

Components of the service for which the action is executed are highlighted in green. Click Add hosts and select a host for the component from the list that appears. The list displays hosts added to the cluster. To add a new host to the cluster, go to the Hosts page.

Add a host to a component
Add a host to a component

After the host is added, click Next.

Reconfigure & Restart

The Reconfigure & Restart action updates service configuration files with the configuration settings specified on the service Primary configuration tab. If a changed parameter requires a restart, the action restarts the service. If not, the Reconfigure & Restart action only reloads configuration.

If you make changes directly to the postgresql.conf or pg_hba.conf file, these changes will be lost.

In the action’s confirmation window, you can enable the Service user password reset option. This option allows you to regenerate passwords for the adpg_replicator and adpg_rewind system Patroni users. It can be useful if you need to update passwords for security reasons, for example, in case of password leaks.

You can also activate the Show advanced toggle button to display the Force reconfigure and restart checkbox that disables validation of the configuration settings before restarting ADPG.

The Force reconfigure and restart option should be used when:

  • The ADPG service is stopped and cannot be started due to misconfiguration. In this case, configuration settings will be replaced with the default values.

  • You have changed parameters of the Patroni ADPG configurations section that require the restart of the Patroni service, for example, patroni_log_dir.

The Run an action window of Reconfigure & Restart
The "Run an action" window of Reconfigure & Restart

Reinstall

The Reinstall action reinstalls the service. It checks installed files and overwrites files with incorrect content. The Reinstall action also installs missing files.

In the Run an action dialog window, you can choose whether ADCM reboots cluster servers after installation.

The Run an action window
The "Run an action" window

Start

The Start action starts a service.

Stop

The Stop action stops a service.

Found a mistake? Seleсt text and press Ctrl+Enter to report it