https://bugzilla.wikimedia.org/show_bug.cgi?id=24738

           Summary: After upgrading, edit any page results in the
                    following error: "Error: 1 ERROR: relation
                    "text_old_id_seq" does not exist"
           Product: MediaWiki
           Version: 1.16.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: Normal
         Component: Database
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: canadien...@yahoo.ca


I used the config script on the web to upgrade the MediaWiki from 1.15.3 to
1.16.0. The following errors were reported by the config script:

-------------------------------------------------------------------------
.
.
.
Setting the search path for user "wiki" ...OK
Connected to postgres 8.1.19
There are already MediaWiki tables in this database. Checking if updates are
needed.
.
.
... search_path for user "wiki" looks correct (mediawiki, public)
... default value of "client_min_messages" is correctly set to "error" for user
"wiki"
... default value of "DateStyle" is correctly set to "ISO, YMD" for user "wiki"
... default value of "TimeZone" is correctly set to "GMT" for user "wiki"
Updating sequence names


Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at
or near "RENAME" at character 65 in
/var/www/html/includes/db/DatabasePostgres.php on line 584

Updating sequence names


Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at
or near "RENAME" at character 65 in
/var/www/html/includes/db/DatabasePostgres.php on line 584

... table "category" already exists
... table "mediawiki_version" already exists
... table "mwuser" already exists.
.
.
----------------------------------------------------------------------------

The 'sequence update' part failed. I traced the source of the above error to
mediawiki-1.16.0/maintenance/postgres/archives/patch-update_sequences.sql. The
'ALTER SEQUENCE' is invalid syntax and I replaced these statements with 'ALTER
TABLE' as per postgres documentation. I reloaded the database from 1.15.3 and
tried to upgrade again and upgrade went without a hitch. I can see the renamed
sequences in mediawiki schema.


However, when I try to update any page I get the following error:

----------------------------------------------------------
MediaWiki internal error.

Original exception: exception 'DBUnexpectedError' with message 'A database
error has occurred
Query: SELECT nextval('text_old_id_seq')
Function:
Error: 1 ERROR: relation "text_old_id_seq" does not exist
' in /var/www/html/includes/db/DatabasePostgres.php:1122
Stack trace:
#0 /var/www/html/includes/db/Database.php(538):
DatabasePostgres->reportQueryError('ERROR: relatio...', 1, 'SELECT
nextval(...', '', false)
#1 /var/www/html/includes/db/DatabasePostgres.php(972):
DatabaseBase->query('SELECT nextval(...')
#2 /var/www/html/includes/Revision.php(827):
DatabasePostgres->nextSequenceValue('text_old_id_seq')
#3 /var/www/html/includes/Article.php(1960):
Revision->insertOn(Object(DatabasePostgres))
#4 /var/www/html/includes/Article.php(1791): Article->doEdit('{{DR
Documentat...', '', 98)
#5 /var/www/html/includes/EditPage.php(1047): Article->updateArticle('{{DR
Documentat...', '', false, false, false, '')
#6 /var/www/html/includes/EditPage.php(2552):
EditPage->internalAttemptSave(false, false)
#7 /var/www/html/includes/EditPage.php(389): EditPage->attemptSave()
#8 /var/www/html/includes/EditPage.php(271): EditPage->edit()
#9 /opt/wiki/extensions/FCKeditor/FCKeditor.body.php(218): EditPage->submit()
#10 [internal function]: FCKeditor_MediaWiki->onCustomEditor(Object(Article),
Object(User))
#11 /var/www/html/includes/Hooks.php(133): call_user_func_array(Array, Array)
#12 /var/www/html/includes/Wiki.php(545): wfRunHooks('CustomEditor', Array)
#13 /var/www/html/includes/Wiki.php(70):
MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title),
Object(User), Object(WebRequest))
#14 /var/www/html/index.php(117):
MediaWiki->performRequestForTitle(Object(Title), Object(Article),
Object(OutputPage), Object(User), Object(WebRequest))
#15 {main}

Exception caught inside exception handler: exception 'DBUnexpectedError' with
message 'SQL error: ERROR: current transaction is aborted, commands ignored
until end of transaction block' in
/var/www/html/includes/db/DatabasePostgres.php:635
Stack trace:
#0 /var/www/html/includes/WatchedItem.php(45): DatabasePostgres->numRows(false)
#1 /var/www/html/includes/User.php(2291): WatchedItem->isWatched()
#2 /var/www/html/includes/Title.php(1011): User->isWatched(Object(Title))
#3 /var/www/html/includes/SkinTemplate.php(847): Title->userIsWatching()
#4 /var/www/html/includes/SkinTemplate.php(490):
SkinTemplate->buildContentActionUrls()
#5 /var/www/html/includes/OutputPage.php(1572):
SkinTemplate->outputPage(Object(OutputPage))
#6 /var/www/html/includes/Exception.php(164): OutputPage->output()
#7 /var/www/html/includes/Exception.php(191): MWException->reportHTML()
#8 /var/www/html/includes/Exception.php(289): MWException->report()
#9 /var/www/html/includes/Exception.php(348):
wfReportException(Object(DBUnexpectedError))
#10 [internal function]: wfExceptionHandler(Object(DBUnexpectedError))
#11 {main}
-----------------------------------------------------------------------------------------------------

Do I need to upadte cache or something? The above error happens when I try to
save a page after updating. Thanks in advance.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to