Starting multiple postmasters with different clusters v16
You can configure EDB Postgres Advanced Server to use multiple postmasters, each with its own database cluster. The steps required are specific to the version of the Linux host.
On RHEL/Rocky Linux/AlmaLinux 8.x | 9.x
The edb-as16-server-core
RPM for version 8.x | 9.x contains a unit file that starts the EDB Postgres Advanced Server instance. The file allows you to start multiple services with unique data
directories and monitor different ports. You need root access to invoke or modify the script.
This example creates an EDB Postgres Advanced Server installation with two instances. The secondary instance is named secondary
.
Make a copy of the default file with the new name. As noted at the top of the file, all modifications must reside under
/etc
. You must pick a name that isn't already used in/etc/systemd/system
.Edit the file, changing
PGDATA
to point to the newdata
directory that you're creating the cluster against.Create the target
PGDATA
with the user enterprisedb.Run
initdb
, specifying the setup script:Edit the
postgresql.conf
file for the new instance, specifying the port, the IP address, TCP/IP settings, and so on.Make sure that the new cluster runs after a reboot:
Start the second cluster:
- On this page
- On RHEL/Rocky Linux/AlmaLinux 8.x | 9.x