Page MenuHomePhabricator

DB failure with PostgreSQL: relation "ignore" does not exist
Open, Needs TriagePublic


I receive the following errors when trying to use UserMerge to merge two users, with a PostgreSQL DB backend:

2016-03-22 16:19:33 GMT [12077-1] mediawiki@mediawiki ERROR:  relation "ignore" does not exist at character 52
2016-03-22 16:19:33 GMT [12077-2] mediawiki@mediawiki STATEMENT:  UPDATE /* MergeUser::mergeDatabaseTables foobar */ IGNORE "user_groups" SET ug_user = '1586' WHERE ug_user = '1495'

This suggests that the plugin uses incorrect syntax in SQL to merge users; this is a very big headache unfortunately, as there's no other way to 'delete' users than to merge them into a generic 'target' account that is a catchall for all delete operations.

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.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 22 2016, 4:26 PM
teward001 updated the task description. (Show Details)Mar 22 2016, 4:29 PM
Aklapper renamed this task from DB failure with PostgreSQL to DB failure with PostgreSQL: relation "ignore" does not exist.Mar 22 2016, 5:59 PM
Jjanes added a subscriber: Jjanes.Apr 2 2016, 9:42 PM

Do we know if this bug has always existed, or is new?

Change 281238 had a related patch set uploaded (by Jjanes):

Jjanes claimed this task.Apr 3 2016, 12:59 AM

To answer my own question, the problem does not exist in 1.23 but does in all later versions.

It seems like the best solution to fix the core code so that PostgreSQL can emulate UPDATE IGNORE by the use of savepoints, which I have now done by copying the method from the existing emulation used for INSERT.

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

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