Page MenuHomePhabricator

Delete prefstats tables
Closed, ResolvedPublic

Description

Prefstats is an old extension which has been unused for years and is now decomissioned (see T134441). However, its database tables (named prefstats) still exist on the production cluster, or at least the analytics store replicas, despite having no updates since 2012:

select max(ps_start), max(ps_end) from enwiki.prefstats;

max(ps_start)	max(ps_end)
20120321190136	20120321195103

These tables can all be dropped. I can confirm the Editing department does not need the data, since it's old and since we have very similar data in the PrefUpdate event logs. I'm filing this because my impression is that the DBAs prefer to delete unneeded tables; personally, I would be fine if they were not deleted too.

The table on enwiki has about 3 M rows.

Deletion progress (backups: T154490#4107502):

  • s1
    • codfw
    • eqiad
  • s2
  • s3
    • codfw
    • eqiad
  • s4
  • s5
  • s6
  • s7
  • s8 - table not present

Event Timeline

Thanks for letting us know! We will take care of them and we will also backup them before.
They do exist on production:

root@db2034:/srv/sqldata/enwiki# ls -lh prefstats.ibd
-rw-rw---- 1 mysql mysql 300M Mar 12  2013 prefstats.ibd
Marostegui triaged this task as Medium priority.Jan 3 2017, 4:15 PM
Marostegui moved this task from Triage to Backlog on the DBA board.

I have dumped these tables on the following path: /srv/tmp/prefstats for the following section/host

s1: db1089
s2: db1090
s3: db1072
s4: db1091
s5: db1082
s6: db1113
s7: db1094
s8: wikidata doesn't have that table.

And I have renamed this table on db1089 (enwiki) to: T154490_prefstats

Mentioned in SAL (#wikimedia-operations) [2018-04-11T10:31:43Z] <marostegui> Drop table prefstats in s6 - T154490

Mentioned in SAL (#wikimedia-operations) [2018-04-11T10:33:05Z] <marostegui> Drop table prefstats in s4 - T154490

Mentioned in SAL (#wikimedia-operations) [2018-04-11T10:43:12Z] <marostegui> Drop table prefstats in s2 - T154490

Mentioned in SAL (#wikimedia-operations) [2018-04-11T11:04:08Z] <marostegui> Drop table prefstats in s7 - T154490

Marostegui updated the task description. (Show Details)
Marostegui moved this task from Backlog to In progress on the DBA board.

Mentioned in SAL (#wikimedia-operations) [2018-04-11T13:09:21Z] <marostegui> Drop prefstats table on s3 codfw master - db2043 (this might generate lag on codfw) - T154490

Mentioned in SAL (#wikimedia-operations) [2018-04-11T13:13:53Z] <marostegui> Drop prefstats table on s1 codfw master - db2048 (this might generate lag on codfw) - T154490

Change 425521 had a related patch set uploaded (by Marostegui; owner: Marostegui):
[operations/mediawiki-config@master] db-eqiad.php: Depool db1072

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

Change 425521 merged by jenkins-bot:
[operations/mediawiki-config@master] db-eqiad.php: Depool db1072

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

Mentioned in SAL (#wikimedia-operations) [2018-04-11T13:27:20Z] <marostegui> Drop prefstats table on s3 sanitarium master (db1072) this might cause lag on labs - T154490

Marostegui updated the task description. (Show Details)

All done.
Thanks!