Serviceguard Toolkits for Contrib User Guide Version A.12.00.00
Table 5 PostgreSQL toolkit files
Available in directoryDescriptionFile name
$SGROOT/postgresqltoolkitThis 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
$SGCONF/modules/tkit/pgsqlThis is an attribute definition file, used
to generate a package ASCII template
in modular style of packaging.
pgsq.l
pgsq.2
$SGCONF/scripts/tkit/pgsqlThis is the module script. This script is
called by the master control script and
tkit_module.sh
acts as an interface between the
master control script and the toolkit
interface script (toolkit.sh).
Setting up the PostgreSQL server in SG/LX environment
Before configuring the Serviceguard package, you must complete the following configuration tasks
for the application:
1. When the PostgreSQL database is installed, the default PostgreSQL server might be configured
to start during system startup. If the server is already installed and configured, simply stop it
with the following command.
RedHat : "service postgresql stop"
2. Remove or move the following runlevel files. This disables automatic startup when the machine
boots.
• Red Hat : /etc/rc.d/init.d/postgresql
• SLES: /etc/rc.d/postgresql
Here is a simple example of configuring PostrgreSQL database instance.
1. Create directory where the database is going to be mounted.
2. Change the ownership of the directory to postgres:postgres.
For Example:
$ mkdir /pgsql1
$ chown postgres:postgres /pgsql1
3. After mounting, create the PostgreSQL database using the following command:
"/usr/bin/initdb -D <Directory>"
For Example:
$ /usr/bin/initdb -D /pgsql1
4. Edit the following parameters in the PostgreSQL database configuration file
(postgresql.conf) which is present in the database directory.
tcpip_socket = true # Allows the client connection over the network port
= 5433 # Select a unique port number for each of the
# PostgreSQL toolkit Packages
The presence of parameter tcpip_socket is dependent on the version of postgresql
supported by the distro. The newer versions of postgresql have replaced the parameter
Setting up the PostgreSQL server in SG/LX environment 19