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

Document Information

Preface

1.  Installing and Configuring HA for PostgreSQL

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

B.  Deployment Example: Installing PostgreSQL in the Global Zone

C.  Deployment Example: Installing PostgreSQL in a Non-Global HA Container

Target Cluster Configuration

Software Configuration

Assumptions

Installing and Configuring PostgreSQL on Shared Storage in a Non-Global HA Container

Example: Preparing the Cluster for PostgreSQL

Example: Configuring Cluster Resources for PostgreSQL

Example: Configuring the HA Container

Example: Modifying the PostgreSQL Configuration File

Example: Building and Installing the PostgreSQL Software on Shared Storage in an HA Container

Example: Enabling the PostgreSQL Software to Run in the Cluster

Installing the PostgreSQL Binaries in the Default Directory in an HA Container (Alternative Installation)

Example: Building and Installing the PostgreSQL Software in the Default Directory in an HA Container

D.  Deployment Example: Installing PostgreSQL in a Non-Global Zone

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

Index

Example: Building and Installing the PostgreSQL Software in the Default Directory in an HA Container

This example illustrates how to install the PostgreSQL software in the default directory /usr/local/pgsql. You can also build and install the PostgreSQL binaries on shared storage. See Installing and Configuring PostgreSQL on Shared Storage in a Non-Global HA Container.

Before You Begin

You can only install the PostgreSQL software in the default directory if one of the following conditions is true:

If /usr/local/pgsql is linked to the global zone, create this directory in the non-global zone as well.

  1. Log in as the PostgreSQL user.
    zone# su - postgres
  2. Create the directory in the non-global zone.
    zone$ mkdir /pgsql-linksource
  3. Expand the software tar file.
    zone$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf -
  4. Add the C compiler and ar to your PATH.
    zone$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
    zone$ export PATH
  5. Add the C compiler and readline libraries to your LD_LIBRARY_PATH.
    zone$ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib
    zone$ export LD_LIBRARY_PATH
  6. Install the source and configure the build.
    zone$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf -  
    zone$ cd /global/mnt3/postgres/build/postgresql-8.1.0
    zone$ ./configure
  7. Build the PostgreSQL binaries.
    zone$ gmake

    If you use gcc to build the postgres binaries, build them in a failover file system.

  8. Run the PostgreSQL regression tests.
    zone$ gmake check
  9. Switch to the root user.
    zone$ su
  10. Add the C compiler and ar to your PATH.

    This example assumes the following:

    • The compiler is gcc, located in /usr/sfw/bin.

    • ar is located in /usr/ccs/bin.

    zone# PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
    zone# export PATH
  11. Add the C compiler and readline libraries to your LD_LIBRARY_PATH.
    zone# LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib
    zone# export LD_LIBRARY_PATH
  12. Install the binaries.
    zone# gmake install
  13. Exit from root access.
    zone$ exit
  14. Clean the distribution.
    zone# gmake clean

Next Steps

Perform the steps in Example: Enabling the PostgreSQL Software to Run in the Cluster to complete installation and configuration of PostgreSQL.