JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for PostgreSQL Guide     Oracle Solaris Cluster 4.1
search filter icon
search icon

Document Information

Preface

1.  Installing and Configuring HA for PostgreSQL

A.  Files for Configuring Oracle Solaris Cluster HA for PostgreSQL Resources

B.  Deployment Example: Installing PostgreSQL in the Global Zone or a Zone Cluster

C.  Deployment Example: Installing PostgreSQL in a Non-Global Zone With HA for Solaris Zones

Target Cluster Configuration

Software Configuration

Assumptions

Installing and Configuring PostgreSQL on Shared Storage in a Non-Global Zone with HA for Solaris Zones

Example: Preparing the Cluster for PostgreSQL

Example: Configuring Cluster Resources for PostgreSQL

Example: Configuring HA for Solaris Zones

Example: Modifying the PostgreSQL Configuration File

Example: Building and Installing the PostgreSQL Software on Shared Storage in a Non-Global Zone With HA for Solaris Zones

Example: Enabling the PostgreSQL Software to Run in the Cluster

Installing the PostgreSQL Binaries in the Default Directory in a Non-Global Zone With HA for Solaris Zones (Alternative Installation)

Example: Building and Installing the PostgreSQL Software in the Default Directory in a Non-Global Zone With HA for Solaris Zones

D.  Deployment Example: Installing PostgreSQL in the Global Zone Using WAL File Shipping

Index

Example: Enabling the PostgreSQL Software to Run in the Cluster

  1. Create the directories for the databases and the log file.
    zone$ mkdir /global/mnt3/postgres/data
    zone$ mkdir /global/mnt3/postgres/logs
  2. Change to the PostgreSQL root directory and initialize the data cluster.
    zone$ cd /postgres/postgresql-8.1.0
    zone$ ./bin/initdb -D postgres/data
  3. Start the database.
    zone$ ./bin/postmaster -D /postgresql-8.1.0
  4. Prepare the Oracle Solaris Cluster-specific test database.
    zone$ ksh /opt/SUNWscPostgreSQL/util/pgs_db_prep -f /tmp/pgs_config -e
  5. Stop the postmaster.
    zone$ ./bin/pg_ctl -D /postgres/data stop
  6. Add the following line to the /postgres/data/postgresql.conf file.
    listen_addresses = 'localhost,ha-host-1'
  7. Add the following line to the /postgres/data/pg_hba.conf file.
    host    all         all        0.0.0.0/0      password
  8. Encrypt the password of the monitoring user on the zone, to run the PostgreSQL resource.
    zone# ksh /opt/SUNWscPostgreSQL/util/pgs_register -f /global/mnt3/pgs_config -e
  9. Leave the zone.
    zone$ exit
  10. Run the pgs_register script to register the resource.
    phys-schost-1# ksh /opt/SUNWscPostgreSQL/util/pgs_register -f /global/mnt3/pgs_config
  11. Enable the resource.
    phys-schost-1# clresource enable RS-PGS