4.5 Starting Multiple Postmasters with Different Clusters

Table of Contents Previous Next


4 Using a Package Manager to Install Advanced Server : 4.5 Starting Multiple Postmasters with Different Clusters

The edb-as11-server-core RPM contains a script that starts the Advanced Server instance. The script can be copied, allowing you to run multiple services, with unique data directories and that monitor different ports. You must have root access to invoke or modify the script.
1.
Create a hard link in /etc/rc.d/init.d (or equivalent location) to the edb-as-11 service (named secondary-edb-as-11):
2.
Create a file in /etc/sysconfig/edb/as11/ named secondary-edb-as-11. This file is where you would typically define PGDATA and PGOPTS. Since $PGDATA/postgresql.conf will override many of these settings (except PGDATA) you might notice unexpected results on startup.
3.
Create the target PGDATA directory.
4.
Assume the identity of the Advanced Server database superuser (enterprisedb) and invoke initdb on the target PGDATA. For information about using initdb, please see the PostgreSQL Core Documentation available at:
5.
Edit the postgresql.conf file to specify the port, address, TCP/IP settings, etc. for the secondary instance.
The edb-as11-server-core RPM for version 7.x contains a unit file that starts the Advanced Server instance. The file allows you to start multiple services, with unique data directories and that monitor different ports. You must have root access to invoke or modify the script.
1.
2.
Edit the file, changing PGDATA to point to the new data directory that you will create the cluster against.
3.
Create the target PGDATA with user enterprisedb.
4.
Run initdb, specifying the setup script:
5.
Edit the postgresql.conf file for the new instance, specifying the port, the IP address, TCP/IP settings, etc.

4 Using a Package Manager to Install Advanced Server : 4.5 Starting Multiple Postmasters with Different Clusters

Table of Contents Previous Next