Page MenuHomePhabricator

Cannot save edits on PostgreSQL
Closed, InvalidPublic

Description

Author: bwlist

Description:

  • MediaWiki: 1.9.3
  • PHP: 5.1.6 (apache2handler)
  • PostgreSQL: PostgreSQL 8.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)

3.3.5 (Debian 1:3.3.5-13)

Internal error

A database error has occurred Query: SELECT nextval('rev_rev_id_val') Function:
Error: 1 ERROR: current transaction is aborted, commands ignored until end of
transaction block

Backtrace:

#0 /var/www/html/wiki/includes/Database.php(665):
DatabasePostgres->reportQueryError('ERROR: current...', 1, 'SELECT nextval(...',
'', false)
#1 /var/www/html/wiki/includes/DatabasePostgres.php(537):
Database->query('SELECT nextval(...')
#2 /var/www/html/wiki/includes/Revision.php(657):
DatabasePostgres->nextSequenceValue('rev_rev_id_val')
#3 /var/www/html/wiki/includes/Article.php(1328):
Revision->insertOn(Object(DatabasePostgres))
#4 /var/www/html/wiki/includes/Article.php(1197): Article->doEdit('== Abstract

?...', '', 98)

#5 /var/www/html/wiki/includes/EditPage.php(846): Article->updateArticle('==
Abstract ==?...', '', false, false, '', '')
#6 /var/www/html/wiki/includes/EditPage.php(414): EditPage->attemptSave()
#7 /var/www/html/wiki/includes/EditPage.php(267): EditPage->edit()
#8 /var/www/html/wiki/includes/Wiki.php(417): EditPage->submit()
#9 /var/www/html/wiki/includes/Wiki.php(50):
MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title),
Object(User), Object(WebRequest))
#10 /var/www/html/wiki/index.php(48): MediaWiki->initialize(Object(Title),
Object(OutputPage), Object(User), Object(WebRequest))
#11 {main}

This problem possibly started when I upgraded my database backend to 8.2.3 but I
can not say for sure. Mediawiki was not my biggest concern when I upgraded my
database and I did not notice this problem until now. The weird thing is that
when I run 'SELECT nextval('rev_rev_id_val')' with the psql client it does
return a sequence number correctly without throwing an error. I wonder why it
thinks this query is failing. Thanks.


Version: 1.9.x
Severity: major
OS: Linux
Platform: PC

Details

Reference
bz9385

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
InvalidNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:38 PM
bzimport set Reference to bz9385.
bzimport added a subscriber: Unknown Object (MLST).

The problem is something *before* that nextval query has blown up, and aborted
the current transaction. Try looking in the Postgres logs to see if you can find
out the real error. Does the new db have tsearch2? What version did you update
it from, and how was the migration done?

bwlist wrote:

You are correct. It turns out it is a tsearch2 problem. The PostgreSQL migration
from 8.1 to 8.2 and reloading databases with tsearch2 was not as straightforward
as I thought. This is not a mediawiki problem and I am sorry for the inconvenience.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.