Forum OpenACS Development: Re: OpenACS 5.9.0 , Postgresql 9.4, and Naviserver 4.99

Collapse
Posted by Gustaf Neumann on
Dear Khy,

if you want to set up multiple OpenACS instances (say the OpenACS instances "oacs-5-9" and "oacs-5-9-custom") against the same PostgreSQL installation (pg speak: "database cluster" [1]) , you have define create different databases [2] in this cluster for every OpenACS instance (the databases might be named e.g. oacs-5-9 and oacs-5-9-custom as well). The name of the db is specified in the startup file of the server.

if you try to run multiple OpenACS instances against the same database (using for both instances the same database instance name), many things will break fundamentally, the changes you indicate above are just the tip of the iceberg.

-g

[1] http://www.postgresql.org/docs/9.4/static/creating-cluster.html
[2] http://www.postgresql.org/docs/9.4/static/app-createdb.html

Collapse
Posted by Khy Huang on
HI Gustaf,

Thanks for the reply. This is a change from the previous way done with Postgresql 8.x where we created one db and have different users and schemas. Our system administrator went to an Enterprise DB training and it was recommended to go with the one DB approach. Out of curiosity, do you know why OpenACS went into multiple DBs direction ? Thanks.

Regards,
Khy

Collapse
Posted by Gustaf Neumann on
The decision about using separate databases was done before i got involved with OpenACS. Probably at that time the support for multiple schemata in oracle/pg was bad/not existing, so using different dbs for different instances was a no-brainer. The biggest advantage of the multiple schema approach is imho referential integrity across instances, which is not needed for OpenACS.

Separate dbs makes it easier to migrate/upgrade/save one instance, the security separation is easier, etc. but altogether the pros/cons are somewhat even (see e.g. [1])

-g

[1] https://www.brentozar.com/archive/2011/06/how-design-multiclient-databases/

Collapse
Posted by Khy Huang on
Thank You.