Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Cluster Data Service for PostgreSQL Guide Oracle Solaris Cluster 4.1 |
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
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: Enabling the PostgreSQL Software to Run in the Cluster
D. Deployment Example: Installing PostgreSQL in the Global Zone Using WAL File Shipping
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 Zone with HA for Solaris Zones.
Before You Begin
You can only install the PostgreSQL software in the default directory if one of the following conditions is true:
/usr is not inherited
/usr/local/pgsql is linked to somewhere in the global zone
If /usr/local/pgsql is linked to the global zone, create this directory in the non-global zone as well.
zone# su - postgres
zone$ mkdir /pgsql-linksource
zone$ gzcat /tmp/postgresql-8.1.0.tar.gz |tar xvf -
zone$ PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin zone$ export PATH
zone$ LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib zone$ export LD_LIBRARY_PATH
zone$ gzcat /tmp/postgresql-8.1.0.tar.gz | tar xvf - zone$ cd /global/mnt3/postgres/build/postgresql-8.1.0 zone$ ./configure
zone$ gmake
If you use gcc to build the postgres binaries, build them in a failover file system.
zone$ gmake check
zone$ su
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
zone# LD_LIBRARY_PATH=/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib zone# export LD_LIBRARY_PATH
zone# gmake install
zone$ exit
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.