The cu_useragent table added in T359312: Create cu_useragent table has private data (user agent strings) which, per DBA and to ensure privacy, must be purged. The exact strategy to do this has not been decided and needs consideration because when implementing Client Hints, we did not purge rows from cu_useragent_client_hints because of the difficulty in reliably deleting rows.
The following strategies could be used:
- Only deleting when the primary key is below 99% (as suggested in T359312#9614750)
- Using a "pending deletion" column strategy:
- If a cu_useragent row is un-used, mark the row as "pending deletion" by updating a column for the row to be deleted in the cu_useragent table - A dedicated column would need to be added for this.
- Wait for this change to be applied to all replicas
- Check if the row pending deletion is being used again
- If the row is being used, then mark the row as no longer pending deletion
- If the row isn't being used, then delete it.