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.
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 non-global zone or in the global zone. If you are in an HA for Solaris Zones configuration, use /postgres instead of /global/postgres for your directory prefix in this procedure.
# su - postgres
$ 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
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
$ mkdir /global/postgres/data $ mkdir /global/postgres/logs
$ cd ~/postgres-version $ ./bin/initdb -D $PGDATA
$ ./bin/pg_ctl -l /global/postgres/logs/firstlog start
$ ./bin/createdb test $ ./bin/dropdb test