Last modified: 2012-08-04 20:48:58 UTC
I got this error message once when browsing the wiki normally, a refresh of the page didn't show the error message again so I thought it was just some caching error since I just updated from svn. However somebody in #mediawiki was asking about schema changes and I came across r32085 so I tried running the maintnence script, and sure enough, there was that error message again: === Warning: pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block in /home/wiki/includes/DatabasePostgres.php on line 553 A database error has occurred Query: SELECT COUNT(*) AS pages,COUNT(IF(page_namespace=14,1,NULL)) AS subcats,COUNT(IF(page_namespace=6,1,NULL)) AS files FROM categorylinks,page WHERE cl_to = 'Rainbow_Tables' AND (page_id = cl_from) Function: Category::refreshCounts Error: 1 ERROR: current transaction is aborted, commands ignored until end of transaction block Backtrace: #0 /home/wiki/includes/Database.php(799): DatabasePostgres->reportQueryError('ERROR: current...', 1, 'SELECT COUNT(*...', 'Category::refre...', false) #1 /home/wiki/includes/Database.php(1244): Database->query('SELECT COUNT(*...', 'Category::refre...') #2 /home/wiki/includes/Database.php(1263): Database->select(Array, Array, Array, 'Category::refre...', '1OCK IN SHARE M...') #3 /home/wiki/includes/Category.php(285): Database->selectRow(Array, Array, Array, 'Category::refre...', 'LOCK IN SHARE M...') #4 /home/wiki/maintenance/populateCategory.inc(61): Category->refreshCounts() #5 /home/wiki/maintenance/populateCategory.php(51): populateCategory('', 10, 0, false) #6 {main} ==== If I try running that through something like phppgadmin you get a more helpful error message: ==== ERROR: function if(boolean, integer, unknown) does not exist LINE 1: SELECT COUNT(*) AS pages,COUNT(IF(page_namespace=14,1,NULL)... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. In statement: SELECT COUNT(*) AS pages,COUNT(IF(page_namespace=14,1,NULL)) AS subcats,COUNT(IF(page_namespace=6,1,NULL)) AS files FROM mediawiki.categorylinks,mediawiki.page WHERE cl_to = 'Rainbow_Tables' AND (page_id = cl_from) ==== for PG that should be something like: ==== SELECT COUNT(*) AS pages,COUNT(CASE WHEN page_namespace=14 THEN 1 ELSE NULL END) AS subcats,COUNT(CASE WHEN page_namespace=6 THEN 1 ELSE NULL END) AS files FROM categorylinks,page WHERE cl_to = 'Rainbow_Tables' AND (page_id = cl_from) ==== Problem is on line 278 of trunk/phase3/includes/Category.php
Should be fixed now, as of r32173. You will need to run maintenance/update.php to add the new category table first.