Upgrading an existing cluster v4

Failover Manager provides a utility to assist you when upgrading a cluster managed by Failover Manager. To upgrade an existing cluster, you must:

  1. Install Failover Manager 4.4 on each node of the cluster. For detailed information about installing Failover Manager, see Installing Failover Manager.

  2. After installing Failover Manager, invoke the efm upgrade-conf utility to create the .properties and .nodes files for Failover Manager 4.4. The Failover Manager installer installs the upgrade utility (efm upgrade-conf) to the /usr/edb/efm-4.4/bin directory. To invoke the utility, assume root privileges, and invoke the command:

efm upgrade-conf <cluster_name>

The efm upgrade-conf utility locates the .properties and .nodes files of preexisting clusters and copies the parameter values to a new configuration file for use by Failover Manager. The utility saves the updated copy of the configuration files in the /etc/edb/efm-4.4 directory.

  1. Modify the .properties and .nodes files for Failover Manager 4.4, specifying any new preferences. Use your choice of editor to modify any additional properties in the properties file (located in the /etc/edb/efm-4.4 directory) before starting the service for that node. For detailed information about property settings, see The cluster properties file.
Note

db.bin is a required property. When modifying the properties file, ensure that the db.bin property specifies the location of the Postgres bin directory.

  1. If you're using Eager Failover, you must disable it before stopping the Failover Manager cluster. For more information, see Disabling Eager Failover.

  2. Use a version-specific command to stop the old Failover Manager cluster. For example, you can use the following command to stop a version 4.1 cluster:

/usr/efm-4.1/bin/efm stop-cluster efm
  1. Start the new Failover Manager service (edb-efm-4.4) on each node of the cluster.

The following example shows invoking the upgrade utility to create the .properties and .nodes files for a Failover Manager installation:

[root@k8s-worker ~]# /usr/edb/efm-4.4/bin/efm upgrade-conf efm
Checking directory /etc/edb/efm-4.1
Processing efm.properties file

The following properties were added in addition to those in the previous installed version:
priority.standbys
detach.on.agent.failure

Checking directory /etc/edb/efm-4.1
Processing efm.nodes file

Upgrade of files is finished. The owner and group for properties and nodes files have been set as 'efm'.
[root@k8s-worker ~]#

If you're using a Failover Manager configuration without sudo, include the -source flag and specify the name of the directory in which the configuration files reside when invoking upgrade-conf. If the directory isn't the configuration default directory, the upgraded files are created in the directory from which the upgrade-conf command was invoked.

If you're using a unit file, manually update the file to reflect the new Failover Manager service name when you perform an upgrade.

Uninstalling Failover Manager

Note

If you are using custom scripts, check to see if they are calling any Failover Manager scripts. For example, a script that runs after promotion to perform various tasks and then calls Failover Manager's efm_address script to acquire a virtual IP address. If you have any custom scripts calling Failover Manager scripts, update the custom scripts to use the newly installed version of the Failover Manager script before uninstalling the older version of the Failover Manager script.

After upgrading to Failover Manager 4.4, you can use your native package manager to remove previous installations of Failover Manager. For example, use the following command to remove Failover Manager 4.1 and any unneeded dependencies:

  • On RHEL or CentOS 7.x:
yum remove edb-efm41
  • On RHEL or Rocky Linux or AlmaLinux 8.x:
dnf remove edb-efm41
  • On Debian or Ubuntu:
apt-get remove edb-efm41
  • On SLES:
zypper remove edb-efm41

Performing a database update (minor version)

You can perform a quick minor database version upgrade. You can upgrade from one minor version to another (for example, from 10.1.5 to version 10.2.7) or apply a patch release for a version.

First, update the database server on each standby node of the Failover Manager cluster. Then, perform a switchover, promoting a standby node to the role of primary in the Failover Manager cluster. Then, perform a database update on the old primary node.

On each node of the cluster, perform the following steps to update the database server:

  1. Stop the Failover Manager agent.
  2. Stop the database server.
  3. Update the database server.
  4. Start the database service.
  5. Start the Failover Manager agent.

For detailed information about controlling the EDB Postgres Advanced Server service or upgrading your version of EDB Postres Advanced Server, see the EDB Postgres Advanced Server Guide

When your updates are complete, you can use the efm set-priority command to add the old primary to the front of the standby list (if needed), and then switchover to return the cluster to its original state.