"Saper" posted a comment on MediaWiki.r113487.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/113487#c32029
Commit summary for MediaWiki.r113487:
Handle PostgreSQL transaction errors and improve schema detection
* Introduce $wgDebugDBTransactions facility to help
figure out what's going on with transactions.
Currently PostgreSQL only.
PostgresTransactionState can be easily be made more general
to trace all sorts of state machinery.
* Improve r113408: we don't need to full reconnect on error,
rollback is enough.
Rolling back breaks search_path, as PostgreSQL
can manage sessions settings under transaction therefore
we need to improve schema sniffing introduced in r82674
* Introduce few schema handling functions. This could
probably be generalized for other databases like DB2 and Oracle.
* Fix bug 15816 - Add a switch for SETting the search_path
We try to avoid touching search_path at all unless
really necessary. Even in this case we append MediaWiki
core schema to the front of the list.
* No longer add $wgDBmwschema to PostgreSQL role search_path
in the installer. This is no longer necessary as
setting schema on connect should ReallyWorkNow(tm).
* Get rid as much as possible of $wgDBmwschema and
bring us one step closer to fix bug 16794 (wgSharedDB
support).
All references to core MediaWiki schema in PostgreSQL
specific code should now use Database::getCoreSchema()
unless we know what we are doing.
Followup-To: r113408 r82674
Saper's comment:
Thanks for fixing those.
Still need to fix updater:
<pre>
Yeah, thanks for
"CREATE SEQUENCE logging_log_id_seq"
from within function "".
Database returned error "1: ERROR: relation "logging_log_id_seq" already
exists"
Backtrace:
#0 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(332):
DatabaseBase->reportQueryError('ERROR: relatio...', 1, 'CREATE SEQUENCE...',
'', false)
#1 /usr/home/saper/public_html/pg/w/includes/db/Database.php(906):
DatabasePostgres->reportQueryError('ERROR: relatio...', 1, 'CREATE
SEQUENCE...', '', false)
#2
/usr/home/saper/public_html/pg/w/includes/installer/PostgresUpdater.php(393):
DatabaseBase->query('CREATE SEQUENCE...')
#3 [internal function]: PostgresUpdater->addSequence('logging_log_id_...')
#4
/usr/home/saper/public_html/pg/w/includes/installer/DatabaseUpdater.php(281):
call_user_func_array(Array, Array)
#5
/usr/home/saper/public_html/pg/w/includes/installer/DatabaseUpdater.php(244):
DatabaseUpdater->runUpdates(Array, false)
#6 /usr/home/saper/public_html/pg/w/maintenance/update.php(121):
DatabaseUpdater->doUpdates(Array)
#7 /usr/home/saper/public_html/pg/w/maintenance/doMaintenance.php(105):
UpdateMediaWiki->execute()
</pre>
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview