On Thu, Mar 5, 2009 at 10:05 PM, Chris Darroch <chr...@pearsoncmg.com> wrote:
>  One difference, I think -- again, after only a quick review -- is
> that what I was trying to solve with the notion of a <DBDGroup>
> container and then a DBDGroup directive was to minimize the number
> of distinct configuration groups and make configuration as simple
> as possible.  You could put, say, two <DBDGroup> sets of directives
> into the main server configuration.  Then in a virtual host, you'd
> just need to say "DBDGroup foo" to specify which one you wanted
> to use there.

It's great idea. But are you sure that it is good idea to change both
main httpd.conf and VirtualHost for new DB connection to be added?
These are separate things... It will introduce problems if, for
example, httpd.conf is root writable and virtualhost-blabla.conf is
user writable.

>  Your <DBDPool> changes seem targeted at the issue of supporting
> multiple connections within, say, a single virtual host.  I'm not
> 100% sure if that's the idea, so please correct me if I'm wrong.
> Then callers who want a particular connection pass the DBD "pool"
> name to ap_dbd_open_pool(), etc.

Yes. We configure separate connection pools to separate DBses. MySQL,
PostgreSQL, SQLite for example on different hosts and give them names.

And user can chose connection from which connection pool he wants.

>  This seems like a good enhancement to me, certainly, and we've
> seen some requests for it on the mailing list.  If we're adding
> such configuration containers, though, I personally would want to
> ensure that we had a way to minimize the number of distinct
> connection pools involved.
>
>  It looks to me as though the logic in dbd_post_config() which
> aims to do this, i.e., minimize the number of distinct DBD
> configurations (when using the existing set of directives) is removed
> in the patch.  I may be missing something, but I think that's likely
> to be necessary in the future as well, to support existing installations
> and not require administrators to rewrite their configurations
> after upgrading.

I have tried to keep everything concerning group minimization from
original mod_dbd. If not - it is bug.
I don't really like the way that minimization was implemented, but i
have tried to minimize changes to mod_dbd source.

> Suppose you had many virtual hosts and each one needed one or
> both of two types of DB connection.  You'd want to be able to specify
> the two types of connection in just two <DBDPool> or <DBDGroup>
> containers at the main server level, it seems to me.  Then each
> virtual host could refer back to the ones it required, if, for
> instance, it was adding vhost-specific DBD authentication directives.

But what if owner of blahblah.host.org needs third connection pool and
he can't change httpd.conf?

-- 
Marko Kevac

Reply via email to