Forum OpenACS Q&A: Re: connection to secondary database

Collapse
Posted by Claudio Pasolini on
Simply add one or more pools to your config.tcl file as in the following example.
ns_section ns/db/pools 
ns_param   pool1	   "Pool 1"
ns_param   pool2	   "Pool 2"
ns_param   pool3	   "Pool 3"
ns_param   pool4	   "Pool 4"

.....

ns_section ns/db/pool/pool4
ns_param   maxidle            1000000000
ns_param   maxopen            1000000000
ns_param   connections        5
ns_param   verbose            $debug
ns_param   extendedtableinfo  true
ns_param   logsqlerrors       $debug
ns_param   driver             postgres 
ns_param   datasource        remotehostaddress::remotedbname
ns_param   user               $user_account
ns_param   password           ""
Note also that your remote db must be configured to accept IP connections (set tcpip_socket = true in your postgresql.conf).