Skip to content

insights: migrate away from TimescaleDB specific tables

Created by: coury-clark

Context:

  1. Many customers use managed database solutions such as RDS, Cloud SQL, etc. that do not support TimescaleDB
  2. Guidance from the distribution team is that customers should prefer to use managed database solutions.
  3. The features that guided the decision towards TimescaleDB are mostly behind a proprietary license that would require a non-trivial amount of work from legal et. al. to include in the Sourcegraph license.

A likely candidate for a replacement is falling back to the standard Postgres image shipped with Sourcegraph.

Some things to keep in mind about this migration:

  1. Some of the syntax in the current insights migration scripts is Timescale specific
  2. We may need to either take manual backups or otherwise ship some method of performing this migration as part of a release to preserve user data.
  3. We should aim to have this completed before code insights GA.

Associated issues: https://github.com/sourcegraph/sourcegraph/issues/18956 https://github.com/sourcegraph/sourcegraph/issues/19114 https://github.com/sourcegraph/sourcegraph/issues/19115