Page MenuHomePhabricator

DB failure with PostgreSQL: relation "ignore" does not exist
Closed, ResolvedPublic

Description

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.

Event Timeline

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

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

Change 281238 had a related patch set uploaded (by Jjanes):
PostgreSQL: Support UPDATE IGNORE

https://gerrit.wikimedia.org/r/281238

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 subscribed.

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

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

Change 281238 abandoned by Umherirrender:

[mediawiki/core@master] PostgreSQL: Support UPDATE IGNORE

Reason:

Superseeded by I1409c80b39834d1977c82c489226255a8cc93fd0

https://gerrit.wikimedia.org/r/281238