Page MenuHomePhabricator

[SPIKE] What is the process for creating a table to store thread subsriptions?
Closed, ResolvedPublic


This task is about finding out what steps are required for creating a new database table.


As part of the Talk page pages project, we will be introducing new talk page notifications intended to increase the likelihood that people are aware when: A) someone is talking to them and B) a conversation is happening about a topic people have expressed an interest in.


As part of that latter "B)" category of notifications, we plan to introduce a new feature that will enable people to opt-in/out of being notified [i] when a new comment is posted in a specific section on a talk page. To enable this functionality, we think a new table will need to be created that knows the following:

  • All of the sections capable of being watched
  • Which users have opted into watching a given section
  • Each individual users' watch status (read: are they still wanting to be notified when a new comment is posted in a given section or have they "unsubscribed"?)

Open questions

  • 1. What is the process for creating a table capable of storing the kind of information described in the "Details" section above?
  • 2. Who are the people we need to consult with about creating a table capable of storing the kind of information described in the "Details" section above?


  • All "Open questions" above are resolved

i. We are not yet sure how people will be notified. E.g. will they be notified via Echo, via a new line item in their Watchlist?

Event Timeline

ppelberg renamed this task from [SPIKE] What is the process for creating a new table? to [SPIKE] What is the process for creating a table to store thread subsriptions?.Aug 13 2020, 4:26 PM
ppelberg created this task.

@Esanders: can you please make sure the following are true?

  1. The task description's "Open questions" section contains all of the questions we are seeking answers to
  2. The task description's "Background" and "Details" sections contain enough information for the TBD person/people to answer the "Open questions"?

...once the task description is in a good place, please assign this task over to Jazmin.

From (emphasis added)

Creating new tables.
This is not a dangerous process, and can be done unattended. However, due to labs filtering limitation (hopefully, to be solved soon) you still should block on a DBA to review the table creation to check private data leak is not possible (and also add heads up to create the appropriate views if they are public).

JTannerWMF added a subscriber: Joe.

Hey @Joe and @Marostegui ! I believe you all are the right people to reach out to about tables. Please see the task description above, we are looking for guidance and a green light.

@JTannerWMF the process of creating a table is sort of split into two, I would say.
The first part is obviously coming up with the table structure (please tag DBA once you've got a draft so we can advise). It would be extremely helpful, once you've got a table draft, to provide some estimations about:

  • size of the table (number of rows expected)
  • expected growth per year (number of rows)
  • Expected writes to the table (per minute, per hour...per day, any of those are ok).
  • Expected amount of reads
  • Can this table be public or private (so we know if it can be replicated to our public cloud infra or it needs to be filtered)
  • The release plan for the feature (are there specific wikis you'd like to test first etc)

Once all that is clear and we are all happy with the table location, schema and so forth, we can go ahead and create the tables in production.
Please note that DBAs do not create the tables, they are created during the normal release process (see:

Removing the DBA task for now, as we do not have action items for now. However, I will stay subscribed to the task just in case there are more questions.

Thanks for involving us very early in the process.

@ppelberg will create a task based on DBA's feedback.

Task is here: T263817.

Thank you for this guidance, @Marostegui !