"Saper" posted a comment on MediaWiki.r82674. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82674#c32009
Commit summary for MediaWiki.r82674: Various Postgres fixes (bug 26612 stuff) * Remove last of $wgDBuser-specific settings like timezone, datestyle and search_path. This is all handled by open() :D * Only set search_path if the schema exists (rather than just set to some random string), fall back to 'public' otherwise * Only call setupUser() if we need to _CreateDBAccount, otherwise it returns immediately and confuses you (no functional change) * Implement selectDB() for Postgres, basically call open() with a new DB name * Try to fix setupDatabase() for this "user must be owner of relation" error I'm getting when the $wgDBuser exists (have tried with roles granted && no roles granted). I get no errors at all when Saper's comment: Adding <pre> $conn->schemaExists() </pre> in "open" has a nasty side-effect - it opens a transaction, therefore the following "SET search_path" will nuked on the next ROLLBACK. We need to introduce ROLLBACK to unstuck the client after errors (see r113408). Wrapping this with <code>$this->begin()</code> and <code>$this->commit()</code> seems to fix the problem. Also, <code>ALTER USER $safeuser SET search_path = $safeschema</code> should be unnecessary. It actually prevents us from ever fixing bug 15816 _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
