Re: [CDBI] Re: odd swapping database issue on vhost / mason install
Rolf Schaufelberger <[email protected]> Tue, 3 Apr 2007 09:24:06 +0200
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Organization | plusW |
| Message-ID | <[email protected]> |
Hi, > > Instead of fighting to keep the CMS::DBI modules separate, you could > instead merge them and make them identical. In other words, have one > CMS::DBI module that returns the appropriate dbh for each vhost by > overriding db_Main(). Take a look at > > http://wiki.class-dbi.com/wiki/Using_with_mod_perl > > You *definitely* need to disable the object index in this scenario, > otherwise the index could become cross-contaminated. > I'm using this setup since years and have many vhosts running in one apache/mod_perl setup and with identical CDBI-Source without problems (and withut disabling the object index!). I'm using postgres and with postgres I use schemas , so I have some schemas common to all vhosts and one schema for each vhost, each of this with the same tables but different data. The search_path is set in db_Main, no problems with that at all. Maybe this is a solution for you too and you don't need the set_up_tables(client[1..n]) . Regards Rolf Schaufelberger [email protected]