[drupal-devel] [bug] Allow both postgres and mysql database connections from within the same site.

adrian drupal-devel at drupal.org
Thu Jun 23 18:50:09 UTC 2005

Issue status update for http://drupal.org/node/19522

 Project:      Drupal
 Version:      cvs
 Component:    database system
 Category:     bug reports
 Priority:     normal
 Assigned to:  adrian
 Reported by:  adrian
 Updated by:   adrian
 Status:       patch
 Attachment:   http://drupal.org/files/issues/multi-dbtype_0.diff (15.04 KB)

Here is an updated and working patch.

We use this patch on Bryght, as our hosting infrastructure is based on
postgres, but the sites themselves use mysql.

I originally wrote this patch as part of the install system however,
since I found myself in the situation where you had a mysql master
installation, and wanted to create a postgres site hosted 'underneath'
it. (the install.php file is multisite aware).


Previous comments:

March 27, 2005 - 06:01 : adrian

Attachment: http://drupal.org/files/issues/multi-dbtype.diff (14.57 KB)

When I originally coded the multiple database support I noted the caveat
that only one database type was useable at a time due to the conflicting
function names, so including both database.pgsql.inc and
database.mysql.inc would cause a crash.

This was also brought up again when someone reopened the multi-db
functionality issue, and I am attaching the patch here.

I would love for this patch to get into 4.6 if possible. I don't
believe it's very invasive, and it fixes a long standing bug in the db
api. I have been using some form of this patch on Bryght for the last
3-4 months, and have not found any ill effects related to it.

I also clarified the db_set_active() comments a bit after I saw this
issue (http://drupal.org/node/13115).


June 21, 2005 - 11:50 : Arto

Would love to have this in the core, but doesn't look like it's included
yet, neither in 4.6.1 nor in the latest snapshot. Any idea yet if and
when it'll be merged?


June 21, 2005 - 11:53 : Arto

Oops, didn't intend to change the title of this bug report. Hereby

More information about the drupal-devel mailing list