HP Serviceguard Contributed Toolkit Suite Version A.04.02.02 on Linux User Guide (December, 2012)

4 PostgreSQL Toolkit
Overview
HP Serviceguard toolkit for PostgreSQL on Linux (PostgreSQL toolkit) enables you to integrate the
PostgreSQL database server with HP Serviceguard. Using PostgreSQL toolkit simplifies application
integration, and eases deployment and maintenance of applications in a cluster environment. The
PostgreSQL toolkit consists of a set of shell scripts that are used by the package control script to
start, stop, and monitor the PostgreSQL database server. The toolkit simplifies integrating PostgreSQL
with SG/LX.
The node where the PostgreSQL database server runs is termed as “Primary” node. The other nodes
configured to take up the service in case of failure are termed as “Standby” nodes. The PostgreSQL
database server application runs on the primary node serving PostgreSQL database requests from
clients. If the primary node fails, the package fails over to the standby node. Ensure that all the
necessary configuration details on all the nodes are identical and the resources are available to
all the supporting nodes. The data must be stored on shared disks and these disks must be accessible
by the same path names on each node.
Advantages
When PostgreSQL toolkit is deployed in an SG/LX cluster, following are the advantages:
Provides monitoring for PostgreSQL daemons.
Enables easy integration of PostgreSQL server in an SG/LX environment.
Provides high availability for the PostgreSQL server.
Prerequisites
PostgreSQL toolkit package requires the following to function:
HP Serviceguard on Linux must be installed on all the nodes that must be configured in the
cluster.
The toolkit must be installed on all the target nodes, where the package is configured to run.
PostgreSQL server must be installed and the database is configured on the storage that is
shared between all the nodes that are configured to run the database.
Files and directories created for PostgreSQL toolkit after installation
The following table describes the scripts installed as part of the PostgreSQL installation.
Table 11 Files created after PostgreSQL toolkit is installed
Available in directoryDescriptionFile name
$SGROOT/postgresqltoolkitThis is the toolkit configuration file. It
contains a list of pre-defined variables
hapgsql.conf
that must be set to run the highly
available PostgreSQL toolkit package.
This is the toolkit main script that
contains internal functions that start or
stop an PostgreSQL instance.
hapgsql.sh
This monitors the health of the running
PostgreSQL server application.
hapgsql.mon
This is interface between the package
control script and the PostgreSQL
toolkit main shell script hapgsql.sh.
toolkit.sh
28 PostgreSQL Toolkit