Is it safe to truncate browser_pageview_events_backup after the September 2026 migrations?

AI-generated summary

scavin inquires about the safety of truncating the browser_pageview_events_backup and browser_pageview_event_scores_backup tables created by September 2026 Discourse migrations. On their self-hosted instance, the backup table contains approximately 2.9 million records (902 MB) ranging from July to September 2026, with no new additions since the migrations completed. The user identified that these tables were generated by migrations archiving duplicate legacy events and post-Beacon cutover data, and notes that application code does not reference them outside of migration files.

The key questions raised are:

  1. Whether it is safe to TRUNCATE these tables now.
  2. If the archived records are still required for reporting, recovery, or future migrations.
  3. If there is a plan for automatic cleanup of such backup tables.

The user aims to reclaim disk space while preserving the table structures.

Hi,

After updating Discourse, I noticed that the September 2026 migrations created two backup tables:

  • browser_pageview_events_backup
  • browser_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.rb
  • 20260910030427_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:

  1. Is it safe to TRUNCATE these backup tables now that the migrations have completed?
  2. Are these archived records still needed for any reporting, recovery, or future migrations?
  3. 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!

4 Likes