Hi,
After updating Discourse, I noticed that the September 2026 migrations created two backup tables:
browser_pageview_events_backupbrowser_pageview_event_scores_backup
On my self-hosted Discourse instance, browser_pageview_events_backup currently contains 2,869,175 records and occupies 902 MB.
The records range from July 11 to September 21, 2026, with no new records added since then.
I checked the relevant migrations:
20260910030404_archive_duplicated_legacy_browser_pageview_events.rb20260910030427_archive_piggyback_browser_pageviews_after_beacon_cutover.rb
It appears these migrations archived duplicate legacy pageview events and events recorded after the Beacon cutover.
I also checked the application code and couldn’t find any references to these backup tables outside the migrations and database schema.
I have a few questions:
- Is it safe to
TRUNCATEthese backup tables now that the migrations have completed? - Are these archived records still needed for any reporting, recovery, or future migrations?
- Is there a plan to automatically clean up these backup tables after a certain period?
I’d prefer to keep the table structures intact while reclaiming the disk space.
Thanks!