Page MenuHomePhabricator

Drop CheckUser tables from closed wikis
Closed, ResolvedPublic

Description

Summary

The CheckUser tables are not needed on closed wikis, because we disabled the extension on those wikis

Technical details

  • The wikis in checkuser-disabled.dblist have the CheckUser DB tables

They all live in s3 except:

mhwiktionary
muswiki

Those two live in s5.

  • Several weeks ago the extension was disabled on those wikis and the disable appears stable
  • Most of the tables still have data, but the only table that has non-purged data is the cu_log table.
    • I confirmed that the cu_log table is empty in all the wikis in checkuser-disabled.dblist
    • The other tables that have entries are not automatically purging their data because the extension was uninstalled (so dropping or at least truncation of these tables would ideally be done soon to ensure the data is purged within 3 months)

Schema change template

  1. ALTERs to run:
    1. RENAME TABLE cu_changes TO cu_changes_temp; RENAME TABLE cu_log_event TO cu_log_event_temp; RENAME TABLE cu_private_event TO cu_private_event_temp; RENAME TABLE cu_log TO cu_log_temp; RENAME TABLE cu_useragent TO cu_useragent_temp; RENAME TABLE cu_useragent_clienthints TO cu_useragent_clienthints_temp; RENAME TABLE cu_useragent_clienthints_map TO cu_useragent_clienthints_map_temp;
    2. DROP TABLE cu_changes_temp; DROP TABLE cu_log_event_temp; DROP TABLE cu_private_event_temp; DROP TABLE cu_log_temp; DROP TABLE cu_useragent_temp; DROP TABLE cu_useragent_clienthints_temp; DROP TABLE cu_useragent_clienthints_map_temp;
  2. Where to run those changes: checkuser-disabled.dblist
  3. When to run those changes: Ideally dropping all rows on cu_changes, cu_log_event, cu_private_event, and cu_useragent_clienthints_map soon per the above, but dropping the tables is not high priority
  4. If the schema change is backwards compatible: No, suggest renaming tables first and then dropping. However, the tables should not be accessed
  5. If the schema change has been tested already on some of the test/beta wikis: N/A
  6. If the data should be made available on the labs replicas and/or dumps: N/A

Event Timeline

Marostegui triaged this task as Medium priority.May 6 2026, 8:15 AM
Marostegui moved this task from Triage to Ready on the DBA board.

@Dreamy_Jazz I'd guess this is a typo:"

RENAME TABLE cu_useragent_clienthints_map TO cu_useragent_clienthints_map

And should be:

RENAME TABLE cu_useragent_clienthints_map TO cu_useragent_clienthints_map_temp

Same with the drop, right?

Marostegui moved this task from Ready to In progress on the DBA board.

Yep its a typo, thanks for spotting

Fixed, starting the rename. Thanks

Rename done, if all goes well, on Monday I will drop them.

Tables dropped in s5, now looping over s3. Will take a bit