To prepare your PostgreSQL installation for cluster control, you create a database, a user, and a table to be monitored by the PostgreSQL resource. Because you need to differentiate between a global zone configuration and an HA for Solaris Zones configuration, two procedures are provided.
Before You Begin
Ensure that you have edited the pgs_config file to specify configuration parameters for the HA for PostgreSQL data service. For more information, see Specifying Configuration Parameters for the PostgreSQL Resource.
# chmod 755 /myplace/pgs_config
# su - postgres
% ksh
$ . /myplace/pgs_config $ export PGDATA PGPORT LD_LIBRARY_PATH
$ $PGROOT/bin/pg_ctl -l $PGLOGFILE start
$ /opt/SUNWscPostgreSQL/util/pgs_db_prep -f /myplace/pgs_config
$ /opt/SUNWscPostgreSQL/util/pgs_db_prep -f /myplace/pgs_config -e
If you want your PostgreSQL databases to listen on more than localhost, configure the listen_address parameter in the file postgresql.conf. Use a plain text editor such as vi, and set the value of listen_address to an appropriate value.
![]() | Caution - The PostgreSQL instance must listen on localhost. For additional information, see http://www.postgresql.org. |
listen_address = 'localhost,myhost'
Use a plain text editor such as vi to add the following line to the file pg_hba.conf.
local testdb all password
$ $PGROOT/bin/pg_ctl stop
Before You Begin
Ensure, that you have edited the pgs_config file to specify configuration parameters for the HA for PostgreSQL data service. For more information, see Specifying Configuration Parameters for the PostgreSQL Resource. Also make sure that the package directory of the HA for PostgreSQL, /opt/SUNWscPostgreSQL, is available in the target zone.
# chmod 755 /myplace/pgs_config
# zlogin pgsql-zone
# su - zpostgr
% ksh
$ . /myplace/pgs_config $ export PGDATA PGPORT LD_LIBRARY_PATH
$ $PGROOT/bin/pg_ctl -l $PGLOGFILE start
$ /opt/SUNWscPostgreSQL/util/pgs_db_prep -f /myplace/pgs_config
$ /opt/SUNWscPostgreSQL/util/pgs_db_prep -f /myplace/pgs_config -e
If you want your PostgreSQL databases to listen on more than localhost, configure the listen_address parameter in the file postgresql.conf. Use a plain text editor such as vi, and set the value of listen_address to an appropriate value.
![]() | Caution - The PostgreSQL instance must listen on localhost. For additional information, see http://www.postgresql.org. |
listen_address = 'localhost,myhost'
Use a plain text editor such as vi to add the following line to the pg_hba.conf file.
local testdb all password
$ $PGROOT/bin/pg_ctl stop