FreeBSD allows the management of multiple instances of PostgreSQL by means of
The trick is to use profiles , that are available for the PostgreSQL rc script (
/usr/local/etc/rc.d/postgresql) even if not well documented, at least in my opinion.
In order to understand how to deal with multiple PostgreSQL instances, consider a system with two cluster: test and prod .
/etc/rc.confyou need to define the
postgresql_profilesvariable, where you list the clusters separated by spaces. Then, for each profile, you define the well know
postgresql_xxxvariables, specifying the profile name before the variable suffix. For example, to define a
PGDATA, that will be usually defined into
postgresql_datavariable, you need to specify a
/etc/rc.confyou need to specify the following…
This thread was posted by one of our members via one of our news source trackers.