Last modified: 2010-05-15 16:03:38 UTC
I really dont know if this is PostgreSQL specific or not so I'll leave that keyword off, but I think it's due to the new article/category stuffs going into svn. Being bored I was going through all the maintenance scripts to see if they were working with Postgres and when I got to the refreshLinks script I got a weird error: ==== 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 554 A database error has occurred Query: SELECT pp_propname,pp_value FROM page_props WHERE pp_page = '1' FOR UPDATE Function: LinksUpdate::getExistingProperties 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 pp_prop...', 'LinksUpdate::ge...', false) #1 /home/wiki/includes/Database.php(1244): Database->query('SELECT pp_prop...', 'LinksUpdate::ge...') #2 /home/wiki/includes/LinksUpdate.php(660): Database->select('page_props', Array, Array, 'LinksUpdate::ge...', Array) #3 /home/wiki/includes/LinksUpdate.php(134): LinksUpdate->getExistingProperties() #4 /home/wiki/includes/LinksUpdate.php(83): LinksUpdate->doIncrementalUpdate() #5 /home/wiki/maintenance/refreshLinks.inc(136): LinksUpdate->doUpdate() #6 /home/wiki/maintenance/refreshLinks.inc(90): fixLinksFromArticle(1) #7 /home/wiki/maintenance/refreshLinks.php(42): refreshLinks(1, NULL, NULL, NULL, NULL, NULL) #8 {main} ==== Running that query by itself yields no errors, but it mentions transactions, so throwing in a echo on 552 on includes/DatabasePostgres.php to get at the actual SQL queries being run I ran into this: ==== BEGIN SELECT /* Revision::fetchRow 127.0.0.1 */ page_namespace,page_title,page_latest,rev_id,rev_page,rev_text_id,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_timestamp,rev_deleted,rev_len FROM page,revision WHERE (rev_id=page_latest) AND (page_id=rev_page) AND page_namespace = '0' AND page_title = 'Main_Page' LIMIT 1 SELECT /* Revision::loadText 127.0.0.1 */ old_text,old_flags FROM pagecontent WHERE old_id = '102' LIMIT 1 ... SELECT version() INSERT /* Article::updateCategoryCounts 127.0.0.1 */ INTO category () VALUES () SELECT /* LinksUpdate::getExistingProperties 127.0.0.1 */ pp_propname,pp_value FROM page_props WHERE pp_page = '1' FOR UPDATE ==== Empty inserts do not make a DB happy. Not sure what circumstances cause this, so it might be able to be triggered from elsewhere besides running the maintenance scripts.
Thanks for the report, this should be fixed in r32233.