[ome-devel] Switching postgres

Ilya Goldberg igg at nih.gov
Tue Sep 28 17:34:44 BST 2004


On Sep 28, 2004, at 10:44 AM, Joshua Moore wrote:

> What config changes need to take place in other OME installations to 
> use a different server for postgres?

Good question.  I was just thinking about that.
This is something we need to store in a configuration file.  We already 
have an installation configuration file (/etc/ome-install.store), but 
its not plain-text.  So the options are to just put it in there anyway 
or to have a new configuration file (/etc/ome-runtime.conf).  The 
worker configuration (just MaxWorkers for now) is stored in 
ome-install.store.  The worker stuff would belong in ome-runtime as 
well if we decide to have a separate runtime file.  Note that most of 
the other configuration variables are stored in the DB 
(OME::Configuration and the CONFIGURATION table), but that doesn't help 
us get to the actual DB.

Anyway, we would need to store something like this:
	$env->datasource() = {
		Delegate       => 'OME::Database::PostgresDelegate'
		ConnectString  => 'dbi:Pg:dbname=ome' # or 
'dbi:Pg:dbname=ome;host=my.host.org'
	}

Loading of the runtime/install environment can be done at server 
startup (easily, since we already have our own httpd.ome.conf file), so 
there wouldn't have to be any penalty for reading this on every 
request.

If you want to do it right away, you need to change the settings in 
perl2/OME/DBConnection.pm.  It really should be done with an installer 
question and a proper config file though.

-Ilya



>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>



More information about the ome-devel mailing list