Page MenuHomePhabricator

Drop unneeded tables from x4 and s4
Open, Needs TriagePublic

Description

See parent.

We do one replica in each cluster first so it would start fataling in cases we missed something instead of doing it all at once.

Progress

x4

  • db1263 master
  • db1260
  • db1261
  • db1262
  • db2248 master
  • db2245
  • db2246
  • db2247

s4

  • db1160: master
  • db1199
  • db1221: NOT YET (sanitarium master)
  • db1228
  • db1238
  • db1242
  • db1245 (down - will be recloned from a clean host https://phabricator.wikimedia.org/T431115)
  • db1244
  • db1247
  • db1248
  • db1249
  • db1252
  • db1265
  • db2179: master
  • db2155
  • db2172
  • db2199
  • db2206
  • db2210
  • db2219
  • db2236
  • db2237
  • db2239
  • db2240
  • dbstore1007
  • clouddb*
  • an-redacteddb1001

Event Timeline

Mentioned in SAL (#wikimedia-operations) [2026-09-08T11:40:41Z] <Amir1> dropping unneeded tables from x4 - db1260 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-08T17:11:54Z] <Amir1> dropping links tables from db1247 (s4 replica) - (T437278)

mysql:root@localhost [commonswiki]> drop table if exists pagelinks;
Query OK, 0 rows affected (0.006 sec)

mysql:root@localhost [commonswiki]> drop table if exists templatelinks;
Query OK, 0 rows affected (0.004 sec)

mysql:root@localhost [commonswiki]> drop table if exists globalimagelinks;
Query OK, 0 rows affected (0.004 sec)

mysql:root@localhost [commonswiki]> drop table if exists externallinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists categorylinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists iwlinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists imagelinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists linktarget;
Query OK, 0 rows affected (0.003 sec)

mysql:root@localhost [commonswiki]> drop table if exists langlinks;
Query OK, 0 rows affected (0.003 sec)

mysql:root@localhost [commonswiki]> drop table if exists existencelinks;
Query OK, 0 rows affected (0.002 sec)

Mentioned in SAL (#wikimedia-operations) [2026-09-08T21:58:39Z] <Amir1> drop links tables from db2210 (T437278)

mysql:root@localhost [commonswiki]> set session sql_log_bin=0;
Query OK, 0 rows affected (0.000 sec)

mysql:root@localhost [commonswiki]> drop table if exists categorylinks;
Query OK, 0 rows affected (0.003 sec)

mysql:root@localhost [commonswiki]> drop table if exists externallinks;
Query OK, 0 rows affected (0.003 sec)

mysql:root@localhost [commonswiki]> drop table if exists globalimagelinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists templatelinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists existencelinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists imagelinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists pagelinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists iwlinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists langlinks;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists linktarget;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists collation;
Query OK, 0 rows affected (0.002 sec)

Before:

root@db2210:/srv/sqldata/commonswiki# ls -Ssh | head
total 2.1T
307G templatelinks.ibd
174G wbc_entity_usage.ibd
167G categorylinks.ibd
161G revision.ibd
138G image.ibd
128G globalimagelinks.ibd
114G externallinks.ibd
 99G content.ibd
 93G filerevision.ibd

After:

root@db2210:/srv/sqldata/commonswiki# ls -Ssh | head
total 1.2T
174G wbc_entity_usage.ibd
161G revision.ibd
138G image.ibd
 99G content.ibd
 93G filerevision.ibd
 70G slots.ibd
 65G logging.ibd
 50G change_tag.ibd
 45G watchlist.ibd

Mentioned in SAL (#wikimedia-operations) [2026-09-08T23:05:57Z] <Amir1> dropped 57 tables on db1260 (T437278)

I have dropped these tables on db1260 to make it completely clean:

mysql:root@localhost [commonswiki]> set session sql_log_bin=0;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists abuse_filter;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists abuse_filter_action;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists abuse_filter_history;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists babel;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists betafeatures_user_counts;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists block;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists block_target;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists content_models;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists cur;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists discussiontools_subscription;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists filetypes;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists global_block_whitelist;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists hidden;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists ipblocks_restrictions;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists page_restrictions;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists protected_titles;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists querycache;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists querycache_info;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists querycachetwo;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists revtag;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_bv2025_edits;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_cookie_match;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_elections;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_entity;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_lists;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_msgs;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_options;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_properties;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_questions;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_strike;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_ucoc2026_edits;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_voters;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists securepoll_votes;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists site_identifiers;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists site_stats;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists sites;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists slot_roles;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_groupreviews;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_groupstats;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_messageindex;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_metadata;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_reviews;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_sections;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists translate_translatable_bundles;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists updatelog;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists user_former_groups;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists user_groups;
Query OK, 0 rows affected (0.002 sec)

mysql:root@localhost [commonswiki]> drop table if exists uw_campaigns;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists watchlist_label;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists watchlist_label_member;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wb_changes;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wb_changes_subscription;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wb_id_counters;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wb_items_per_site;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wb_property_info;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wbqc_constraints;
Query OK, 0 rows affected (0.001 sec)

mysql:root@localhost [commonswiki]> drop table if exists wikilove_log;
Query OK, 0 rows affected (0.002 sec)

So we are sure if something tries to query. It's also as clean as it can be now.

@Ladsgroup confirm I can use this host to create the new sanitarium then?

@Ladsgroup confirm I can use this host to create the new sanitarium then?

Yes. Go for it!

@Ladsgroup can testcommonswiki be removed from this host or at least cleaned up too?

Hi, on it now. Just got out of meeting.

better to keep testcommonswiki but let me clean it.

testcommonswiki in db1260 is clean now.

Thanks this now looks better:

root@db1155:~# check_private_data.py -S /run/mysqld/mysqld.x4.sock
-- Non-public databases that are present:
-- Non-public tables that are present:
-- Unfiltered columns that are present:
root@db1155:~#

@taavi @fnegri for awareness, this ticket tracks the clean up.

Mentioned in SAL (#wikimedia-operations) [2026-09-14T09:40:01Z] <Amir1> drop links tables from db1228 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-14T09:41:46Z] <Amir1> drop links tables from db2172 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-14T16:05:25Z] <Amir1> drop non-links tables from db2247 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-14T16:07:20Z] <Amir1> drop links tables from db2240 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-14T16:09:32Z] <Amir1> drop links tables from db1252 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-16T14:08:23Z] <Amir1> dropped links tables on db1238 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-16T14:09:47Z] <Amir1> dropped links tables on db2237 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-17T07:57:35Z] <Amir1> dropped non-links tables from db2245 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-17T07:59:24Z] <Amir1> dropped non-links tables from db1262 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-17T08:01:27Z] <Amir1> dropped links tables from db2236 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-17T08:03:55Z] <Amir1> dropped links tables from db2219 (T437278)

Mentioned in SAL (#wikimedia-operations) [2026-09-17T08:07:42Z] <Amir1> dropped links tables from db2206 (T437278)

Ladsgroup updated the task description. (Show Details)
Ladsgroup updated the task description. (Show Details)