Skip to content
SENS Platform Docs

ADR-0003: PostgreSQL and TimescaleDB

Accepted for V1.

The platform needs relational customer/device data and long-term telemetry storage.

Existing systems use InfluxDB, but SQL access and relational integration are preferred for this platform.

Use PostgreSQL with TimescaleDB.

PostgreSQL stores relational platform data.

TimescaleDB stores raw ingestion messages and normalized telemetry where time-series behavior is needed.

Positive:

  • SQL-based access.
  • Strong relational modeling.
  • Good fit for tenant, user, device, and telemetry data.
  • TimescaleDB supports hypertables, compression, and time-based retention.

Negative:

  • TimescaleDB operations must be understood.
  • Long retention requires careful partitioning, compression, indexing, and backup strategy.
  • Database-specific behavior must be isolated in repositories and migrations.