Forum OpenACS Development: Adding a password to PGSQL user

Request notifications

Collapse
Posted by Iuri Sampaio on
Hi there,
What would be the parameter to assign a password to pgsql user, within /usr/lib/ns/config-oacs.tcl ?

...
if { $database eq "oracle" } {
set db_password "mysitepassword"
} else {
set db_host localhost
set db_port ""
set db_user $server
}

I tried to use db_password (as showed in Oracle statement), but it didn't work for pgsql as expected.

The goal is to split the OACS installation to a EC2 instance (Debian server) and database to an AWS RDS

Best wishes,
I

Collapse
Posted by Claudio Pasolini on
Hi Iuri,

the parameter you're searching for is named, guess what, password and you will find it within the ns/db/pool/ section.

All the best,

Caludio

Collapse
Posted by Iuri Sampaio on
Thanks Claudio
For future references of this forum, I'm pasting the chunk of code, which corresponds to the parameters of PGSQL, within config.tcl
Best wishes,
I

ns_section ns/db/pool/pool1 {
# ns_param maxidle 0
# ns_param maxopen 0
ns_param connections 15
ns_param LogMinDuration 0.01 ;# when SQL logging is on, log only statements above this duration
ns_param logsqlerrors $debug
if { $database eq "oracle" } {
ns_param driver ora8
ns_param datasource {}
ns_param user $db_name
ns_param password $db_password
} else {
ns_param driver postgres
ns_param datasource ${db_host}:${db_port}:dbname=${db_name}
ns_param user $db_user
ns_param password ""
}
}