Skip to content

Architecture / Decision records / ADR-HIS-037

ADR-HIS-037 Device time-series store

Status Accepted
Decided 2026-11-24 on behalf of the Enterprise Architecture Board, under delegated authority
Record Drafted 2026-11-24; approved 2026-11-24 by the Enterprise Architecture Board
Where the rule lives Architecture, section 7.1

Context

Medical device data needs a store apart from the transactional databases (CMP-ANC-010). The specified load is 400 devices, 640 measurements a second sustained and 800 at peak, sized for 1,600 (NFR-ANC-003), with raw data kept 30 days (about 130 GB).

Options considered

  • PostgreSQL in its own cluster, with time partitions
  • TimescaleDB
  • A separate time-series database product

Decision

PostgreSQL in its own cluster, apart from the transactional databases: daily range partitions managed by pg_partman, a BRIN index on time, batched ingestion, and raw data kept 30 days by dropping whole partitions.

Rationale

The load is well within what partitioned PostgreSQL handles, and dropping a day's partition makes the 30-day retention cheap. It keeps one database engine, one backup toolchain (pgBackRest) and one skill set. TimescaleDB was not chosen because its compression and continuous aggregates are under a source-available licence, which the PRS dependency rules (DEP-001, DEP-003) count against.

Consequences

  • The integrate session of slice OR-7 loads the store at 1,600 measurements a second while the core transaction targets hold.
  • If that check fails, an Apache-2.0 time-series database (for example QuestDB) is evaluated behind the same CMP-ANC-010 contract.
  • Validated values are charted into the clinical stores; the raw store is not the clinical record.