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

HA for PostgreSQL Overview

Overview of Installing and Configuring HA for PostgreSQL

Planning the HA for PostgreSQL Installation and Configuration

PostgreSQL and Oracle Solaris Containers

PostgreSQL WAL Shipping

Configuration Restrictions

Restriction for the Location of the Database Cluster

Restriction for the Listening Policy of the PostgreSQL Database Server

Restriction for the PostgreSQL postgresql.conf File

Restriction for the Password Policy for the HA for PostgreSQL Monitoring Database

Restriction for the PostgreSQL smf Service Name in an HA Container

Restriction for the PostgreSQL WAL File Shipping Without Shared Storage

Configuration Requirements

Dependencies Between HA for PostgreSQL Components

Parameter File for HA for PostgreSQL

Configuration Requirements for the WAL File Shipping Without Shared Storage Configuration

Installing and Configuring PostgreSQL

How to Enable a PostgreSQL Database to Run in a Global Zone Configuration

How to Install and Configure PostgreSQL in a Global Zone

How to Enable a Zone to Run PostgreSQL in a Zone Configuration

How to Install and Configure PostgreSQL in a Zone

How to Enable a Zone to Run PostgreSQL in an HA Container Configuration

How to Install and Configure PostgreSQL in an HA Container

Verifying the Installation and Configuration of PostgreSQL

How to Verify the Installation and Configuration of PostgreSQL

Installing the HA for PostgreSQL Packages

How to Install the HA for PostgreSQL Packages

Registering and Configuring HA for PostgreSQL

Specifying Configuration Parameters for the PostgreSQL Resource

Specifying the Parameters for the Rolechanger Resource

Specifying Configuration Files for WAL File Shipping Without Shared Storage

Preparing Your PostgreSQL Installation for Cluster Control

How to Prepare Your PostgreSQL for Oracle Solaris Cluster Registration in a Global Zone Configuration

How to Prepare Your PostgreSQL for Oracle Solaris Cluster Registration in an HA Container Configuration

Creating and Enabling Resources for PostgreSQL

How to Create and Enable Resources for PostgreSQL

How to Modify Parameters in the HA for PostgreSQL Manifest

How to Remove a HA for PostgreSQL Resource From an HA Container

How to Create and Enable Resources for PostgreSQL Rolechanger

Verifying the HA for PostgreSQL Installation and Configuration

How to Verify the HA for PostgreSQL Installation and Configuration

How to Verify the Oracle Solaris Cluster HA for PostgreSQL WAL File Shipping Installation and Configuration

Tuning the HA for PostgreSQL Fault Monitor

Operation of the HA for PostgreSQL Parameter File

Operation of the Fault Monitor for HA for PostgreSQL

Debugging HA for PostgreSQL

How to Activate Debugging for 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

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

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

Index

Verifying the Installation and Configuration of PostgreSQL

Before you install the HA for PostgreSQL packages, verify that each PostgreSQL instance that you created is correctly configured to run in a cluster. The instance is the PostgreSQL database cluster together with the associated postmaster processes. This verification does not confirm that the PostgreSQL databases are highly available because the HA for PostgreSQL data service is not yet configured.

How to Verify the Installation and Configuration of PostgreSQL

Perform this procedure for each PostgreSQL instance that you created in Installing and Configuring PostgreSQL. During the verification you will complete the PostgreSQL postinstallation steps.

Before You Begin

Determine whether you are in a local zone or in a global zone. If you are in an HA container, use /postgres instead of /global/postgres for your directory prefix in this procedure.

  1. Switch to the PostgreSQL user if necessary.
    # su - postgres
  2. (Optional) Set the PATH and LD_LIBRARY_PATH variables.
    $ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
    $ export PATH
    $ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:
    $ export LD_LIBRARY_PATH
  3. Set the PGDATA variable.

    The PGDATA variable points to the directory where the PostgreSQL database cluster is installed. The PostgreSQL database cluster is a directory that contains the configuration and the data files for all the databases.

    $ PGDATA=/global/postgres/data
    $ export PGDATA
  4. Create the data directory and the logs directory.
    $ mkdir /global/postgres/data
    $ mkdir /global/postgres/logs
  5. Initialize the PostgreSQL cluster.
    $ cd ~/postgres-version
    $ ./bin/initdb -D $PGDATA
  6. Start the PostgreSQL database server.
    $ ./bin/pg_ctl -l /global/postgres/logs/firstlog start
  7. Create and delete a test database.
    $ ./bin/createdb test
    $ ./bin/dropdb test
  8. If you are in a non global zone, leave this zone and return to the target zone.