Page MenuHomePhabricator

updating postgresql-based mediawiki: constraint "pagelinks_pkey" of relation "pagelinks" does not exist
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • MediaWiki 1.31.5 was running
  • The installation got updated to 1.39.17
  • The update to 1.43.8 fails with

What happens?:

constraint "pagelinks_pkey" of relation "pagelinks" does not exist

There are no constraints on the pagelinks table:

SELECT con.*     FROM pg_catalog.pg_constraint con         INNER JOIN pg_catalog.pg_class rel ON rel.oid = con.conrelid         INNER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = connamespace         WHERE nsp.nspname = 'mediawiki' and rel.relname = 'pagelinks';

gives 0 rows

This was also mentioned in T402690

Also subsequent runs of the updater fail because the updater tries to drop the indexes which got dropped before:

DROP INDEX pl_namespace;
DROP INDEX pl_backlinks_namespace

What should have happened instead?:

The update should succeed in any case.