JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Service for PostgreSQL Guide
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 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 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 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

Tuning the HA for PostgreSQL Fault Monitor

The HA for PostgreSQL fault monitor verifies that the data service is running in a healthy condition.

A HA for PostgreSQL fault monitor is contained in each resource that represents the PostgreSQL instance. You created these resources when you registered and configured HA for PostgreSQL. For more information, see Registering and Configuring HA for PostgreSQL.

System properties and extension properties of the PostgreSQL resources control the behavior of the fault monitor. The default values of these properties determine the preset behavior of the fault monitor. Because the preset behavior should be suitable for most Oracle Solaris Cluster installations, tune the HA for PostgreSQL fault monitor only if you need to modify this preset behavior.

Tuning the HA for PostgreSQL fault monitor involves the following tasks:

The fault monitor HA for PostgreSQL differentiates between connection problems and definitive application failures. The value of NOCONRET in the PostgreSQL parameter file specifies the return code for connection problems. This value results in a certain amount of ignored consecutive failed probes as long as they all return the value of NOCONRET. The first successful probe reverts this “failed probe counter” back to zero. The maximum number of failed probes is calculated as100 / NOCONRET. A definitive application failure will result in an immediate restart or failover.

The definition of the return value NOCONRET defines one of two behaviors for failed database connections of a PostgreSQL resource.

  1. Retry the connection to the test database several times before considering the PostgreSQL resource as failed and triggering a restart or failover.

  2. Complain at every probe that the connection to the test database failed. No restart or failover will be triggered.

To achieve either of these behaviors, you need to consider the standard resource properties retry_interval and thorough_probe_interval.

The value 100/NOCONRET defines the maximum number of retries for the probe in the case of a failed connection.

Assume that the following resource parameters are set:

If you encounter, for example, a shortage of available database sessions for 7 minutes, you will see 7 complaints in /var/adm/messages, but no resource restart. If the shortage lasts 10 minutes, you will have a restart of the PostgreSQL resource after the 10th probe.

If you do not want a resource restart in the previous example, set the value of NOCONRET=10 to 5 or less.

For more information, see Tuning Fault Monitors for Oracle Solaris Cluster Data Services in Oracle Solaris Cluster Data Services Planning and Administration Guide.

Operation of the HA for PostgreSQL Parameter File

The HA for PostgreSQL resources use a parameter file to pass parameters to the start, stop, and probe commands. Changes to these parameters take effect at least at every restart or enabling, disabling of the resource.

Changing one of the following parameters, takes effect at the next probe of the PostgreSQL resource:


Note - A false change of the parameters with an enabled PostgreSQL resource might result in an unplanned service outage. Therefore, disable the PostgreSQL resource first, execute the change, and then re-enable the resource.


Operation of the Fault Monitor for HA for PostgreSQL

The fault monitor for HA for PostgreSQL ensures that all the requirements for the zone boot component to run are met: