Tanzu Greenplum 6

Installing the Greenplum High Availability Service

Last Updated December 11, 2024

This section provides guidance on how to install the Greenplum high availability service, called the greenplum-postmaster service. The greenplum-postmaster service monitors the primary segments of a Greenplum cluster to initiate automatic recovery if they become unavailable. This is required if running Greenplum without mirroring. Refer to About the Greenplum Architecture for more information about Greenplum primary segments and mirroring.

This section is not applicable if you deployed a mirrorless Greenplum cluster using the Greenplum Virtual Appliance, since the greenplum-postmaster service is already included and enabled by default. Visit Managing the High Availability Service for Mirrorless Greenplum for more details.

Prerequisites

Ensure you meet the following prerequisites to install the greenplum-postmaster service:

  • You have initialized a Greenplum Database cluster version 6 or above and it is running on Rocky Linux 8.

  • You have downloaded the Greenplum Virtual Service RPM from Broadcom Support Portal under the desired Greenplum release.

    For more information about download prerequisites, troubleshooting, and instructions, see Download Broadcom products and software.

    The Greenplum Virtual Service RPM contains a collection of binaries and services to help with Greenplum virtualization. To install the high availablility service, you use the binary postmaster-service-initialize.

Installing the Greenplum Virtual Service RPM

  1. Copy the Greenplum Virtual Service RPM to the master host.

    scp greenplum-virtual-service-*.rpm root@mdw:/tmp
    
  2. Log in to the master as root and install Greenplum Virtual Service RPM on all the hosts using the gpsync and gpssh commands.

    source /usr/local/greenplum-db/greenplum_path.sh
    gpsync -f /home/gpadmin/hosts-all /tmp/greenplum-virtual-service-*.rpm =:/tmp
    gpssh -f /home/gpadmin/hosts-all -e "dnf install -y /tmp/greenplum-virtual-service-*.rpm"
    
  3. Verify that the greenplum-postmaster-service binaries are installed:

    gpssh -f /home/gpadmin/hosts-all -e "ls -l /etc/gpv/greenplum-postmaster-service"
    

Initializing the greenplum-postmaster Service

  1. Log in to the master as gpadmin user.

  2. Make sure the Greenplum database is running:

    gpstate
    
  3. To initialize postmaster service using the default port (5432) and restart-interval (1m10s), run:

    /etc/gpv/postmaster-service-initialize
    
  4. To initialize the postmaster service with a custom restart interval, use the command below. The restart interval should be greater than the gp_fts_probe_interval to ensure that after a segment automatically restarts, following an unexpected failure, the action is recorded in the gp_configuration_history_table.

    /etc/gpv/postmaster-service-initialize --restart-interval=2m
    
  5. To find the currently configured fts_probe_interval use the below command:

    gpconfig -s gp_fts_probe_interval
    
  6. To initialize postmaster service using a custom port (for example, 6543), run:

    /etc/gpv/postmaster-service-initialize --port 6543
    
  7. On successful completion, postmaster.service starts on all hosts.

Upgrading the Greenplum High Availability Service

Follow these steps to upgrade the Greenplum High Availability Service effectively:

  1. Transfer the latest version of the RPM file to all hosts. This is typically done in the /tmp directory.

  2. Before performing the upgrade, stop the greenplum-postmaster service on all segment hosts as gpadmin user, including the coordinator:

    Stopping the service will not affect the running Greenplum Database. The Greenplum Database might continue to run during the upgrade.

    systemctl --user stop greenplum-postmaster
    systemctl --user disable greenplum-postmaster
    
  3. Run the following command on all hosts to upgrade to the latest version:

    yum install /tmp/greenplum-virtual-service-(latest-version).rpm
    
  4. After the upgrade, verify that the installation was successful by checking the installed version of the package:

    yum list installed | grep greenplum-virtual-service
    

    This command will list the installed version of the Greenplum virtual service, allowing you to confirm that the upgrade was successful.

  5. Once the upgrade and the verification are done, initialize the postmaster service. For instructions on this step, please refer the Initializing the greenplum-postmaster Service section.

Next Steps

Refer to Managing the High Availability Service for Mirrorless Greenplum for details on how to manage the service.