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
D. Deployment Example: Installing PostgreSQL in the Global Zone Using WAL File Shipping
Installing and Configuring PostgreSQL on Shared Storage in the Global Zone
Example: Preparing the Cluster for PostgreSQL
Example: Configuring Cluster Resources for PostgreSQL
Example: Building and Installing the PostgreSQL Software on Shared Storage
Example: Enabling the PostgreSQL Software to Run in the Cluster
The databases are stored under /postgres/data. The log file is stored under /postgres/logs/sclog.
phys-schost-1# PGROOT=/postgres/postresql-8.3.1
phys-schost-1# LD_LIBRARY_PATH=/postgres/postgresql-8.3.1:/usr/sfw/lib: \ /usr/local/lib:/usr/lib:/opt/csw/lib
phys-schost-1# export PGROOT
phys-schost-1# export LD_LIBRARY_PATH
If you are installing the software in the default directory, set PGROOT to /usr/local/pgsql and LD_LIBRARY_PATH to /usr/local/pgsql/lib:/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib.
phys-schost-1# cp /opt/SUNWscPostgreSQL/util/pgs_config /postgres/pgs_config_pri
phys-schost-1# cp /opt/SUNWscPostgreSQL/rolechg/util/rolchg_config /postgres \ /rolechg_config
phys-schost-2# cp /opt/SUNWscPostgreSQL/util/pgs_config /postgres/pgs_config_sta
The following list shows the relevant file entries for pgs_config_pri and the values to assign to each entry.
RS=PRIM-RS RG=POSTGRES-PRIM-RG PORT=5432 LH= HAS_RS= PFILE=PRIM-RS-pfile USER=pgs PGROOT=/usr/local/pgsql PGROOT=/postgres/postgresql-8.3.1 PGPORT=5432 PGHOST=pgsql-port PGLOGFILE=/postgres/logs/sclog # LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib LD_LIBRARY_PATH=/postgres/postgresql-8.3.1/lib:/usr/sfw/lib/opt/csw/lib SCDB=sctest SCUSER=scusser SCTABLE=sctable SCPASS= STDBY_RS=STA-RS STDBY_RG=POSTGRES-STA-RG STDBY_USER=pgs STDBY_HOST=phys-schost-2 STDBY_PARFILE=/postgres/STA-RS-pfile STDBY_PING= ROLECHG_RS= SSH_PASSDIR=
The following list shows the relevant file entries for pgs_config_sta and the values to assign to each entry.
RS=STA-RS RG=POSTGRES-STA-RG PORT=5432 LH= HAS_RS= PFILE=postgres/STA-RS-pfile USER=pgs PGROOT=/usr/local/pgsql PGROOT=/postgres/postgresql-8.3.1 PGPORT=5432 PGLOGFILE=/postgres/logs/sclog # LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/sfw/lib:/usr/local/lib:/usr/lib:/opt/csw/lib LD_LIBRARY_PATH=/postgres/postgresql-8.3.1/lib:/usr/sfw/lib/opt/csw/lib SCDB=sctest SCUSER=scusser SCTABLE=sctable SCPASS= STDBY_RS= STDBY_RG= STDBY_USER= STDBY_HOST= STDBY_PARFILE= STDBY_PING= ROLECHG_RS=ROLECHG-RS SSH_PASSDIR=
The following listing shows the relevant file entries for rolechg_config and the values you need to assign to each entry.
RS=ROLECHG-RS RG=ROLECHG-RG PORT=5432 LH=ha-host1 FILE=postgres/STA-RS-pfile HAS_RS= STDBY_RS=STA-RS PRI_RS=PRIM-RS STDBY_HOST=phys-schost-2 STDBY_PFILE=/postgres/STA-RS-pfile TRIGGER=/postgres/data/failover WAIT=20