Skip to content

Replace ClickHouse metrics storage with TimescaleDB#3

Merged
jbouder merged 4 commits into
mainfrom
copilot/replace-clickhouse-with-timescaledb
Jul 11, 2026
Merged

Replace ClickHouse metrics storage with TimescaleDB#3
jbouder merged 4 commits into
mainfrom
copilot/replace-clickhouse-with-timescaledb

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Migrates Holotable’s metrics backend from ClickHouse to TimescaleDB while preserving guarded dashboard queries, catalog introspection, and read-only access.

Changes

  • Metrics runtime

    • Replaced the ClickHouse client with PostgreSQL execution in read-only transactions.
    • Migrated catalog discovery to information_schema.columns.
    • Updated bound time-range parameters and PostgreSQL-specific SQL safety controls.
  • TimescaleDB infrastructure

    • Added the http_requests hypertable, one-minute continuous aggregate, and seven-day retention policy.
    • Added restricted metrics-role provisioning.
    • Replaced the ClickHouse container and initialization scripts with TimescaleDB.
  • Application integration

    • Migrated source configuration, demo data, SQL generation guidance, and UI defaults.
    • Reworked the metrics seeder for PostgreSQL batch inserts.
    • Removed @clickhouse/client and updated documentation and tests.
SELECT time_bucket('1 minute', ts) AS minute,
       count(*) AS requests
FROM http_requests
GROUP BY minute
ORDER BY minute;

Copilot AI requested a review from jbouder July 11, 2026 15:21
@jbouder
jbouder marked this pull request as ready for review July 11, 2026 15:21
@jbouder
jbouder merged commit cc60587 into main Jul 11, 2026
1 check passed
@jbouder
jbouder deleted the copilot/replace-clickhouse-with-timescaledb branch July 11, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants