Last modified: 2012-08-04 20:48:57 UTC
The configuration directive in LocalSettings.php that controls a wiki's database schema name ($wgDBmwschema) only appears to have relevance when creating Mediawiki's tables under PostgreSQL. As far as I can tell, the database abstraction relies on the fact that it somehow overwrites search_path during schema initialization to subsequently find the tables instead of actually using the configuration variable. This makes two things very difficult under MediaWiki and PostgreSQL: 1) Renaming the wiki's schema. Logic would dictate that you could simply change LocalSettings.php:$wgDBmwschema and then ALTER SCHEMA mediawiki RENAME TO mediawiki_meaningful_description;, but this does not work. 2) Running multiple wiki's on the same database in different schemas. When you install the first one it works just fine. When you install the second one, both the first and second wiki installations are in fact accessing the same schema.
Created attachment 4625 [details] Fix for postgresql schema issue Should fix the schema problem in mediawiki under postgres.
Please see the changes in r25929 and see if that does what you need.
To achieve 1) you only need to run maintenance/update.php afterwards which will adjust search_path of the database user according to LocalSettings.php or adjust search_path of the database user manually with ALTER USER $wgDBuser SET search_path = $wgDBmwschema, $wgDBts2schema;
You'll need separate users to achieve number 2, but I just applied a patch from Sven in r32174 that should make #1 work reliably (thanks Sven!)