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: Modifying the PostgreSQL Configuration File

  1. Modify the PGROOT and PD_LIBRARY_PATH environment variables according to the needs of your build.

    The databases are stored under /global/mnt3/postgres/data.

    The log is stored under /global/mnt3/postgres/logs/sclog.

    phys-schost-1# PG_ROOT=/global/mnt3/postgres/postgresql-8.1.0
    phys-schost-1# LD_LIBRARY_PATH=/global/mnt3/postgres/postgresql-8.1.0/lib \
    phys-schost-1# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/sfw/lib:/usr/local/lib: \
    /usr/lib:/opt/csw.lib
    phys-schost-1# export LD_LIBRARY_PATH PG_ROOT
  2. Store the pfile in a directory in the zone clu1.

    The configuration file name must be available in the zone.

  3. Copy the PostgreSQL configuration file from the agent directory to its deployment location.
    phys-schost-1# cp /opt/SUNWscPostgreSQL/util/pgs_config /global/mnt3
  4. Add this cluster's information to the configuration file.

    The following listing shows the relevant file entries and the values to assign to each entry.

    RS=RS-PGS
    RG=RG-PGS
    PORT=5432
    LH=hahostix1
    HAS_RS=RS-PGS-HAS
    PFILE=/global/mnt3/postgres/RS-PGS-pfile
    …
    # local zone specific options
    ZONE=clu1
    ZONE_BT=RS-PGS-ZONE
    ZUSER=postgres
    PROJECT=USER=postgres
    PGROOT=/usr/local/pgsql
    #PGROOT=/global/mnt3/postgres/postgresql-8.1.0
    PGDATA=/global/mnt3/postgres/data
    PGPORT=5432
    PGHOST=
    PGLOGFILE=/global/mnt3/postgres/logs/sclog
    LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib
    #LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib
    #LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib
    ENVSCRIPT=
    SCDB=sctest
    SCUSER=scuser
    SCTABLE=sctable
    SCPASS=
  5. Save and close the file.
  6. Transfer this configuration file in the zone clu1 under /tmp/pgs_config.
    phys-schost-1# scp /global/mnt3/pgs_config clu1:/tmp