Skip to content

Store self-metrics sweep fails on TimescaleDB 2.29+ (catalog chunk.schema_name/table_name removed); breaks the store-log sweep and collector-cost flush too; live today on the Linux compose image #3918

Closed

Description

@erikdarlingdata

Found by the adversarial review of #3908 (TimescaleDB 2.28.1 → 2.30.1) and verified against real stores.

TimescaleDB 2.29.0 dropped _timescaledb_catalog.chunk.schema_name / table_name. The update script says "add chunk.relid and drop … schema_name, table_name". StoreSelfMetrics.TimescaleInventoriedPredicateSql (Darling/PerformanceMonitor.Darling.Storage/StoreSelfMetrics.cs ~682) joins on those columns. Running the production StoreSelfMetrics.SweepAsync:

  • 2.28.1: OK, 248 rows.
  • 2.30.1, upgraded and fresh alike: 42703: column ch.schema_name does not exist.

Impact:

This is broken today for Linux compose users, not only after a bundle bump. Darling/compose/docker-compose.yml uses timescale/timescaledb:latest-pg17, which is the same image as 2.30.1-pg17. It also blocks #3908: darling-pg CI goes red on a 2.30.1 runtime (StoreSelfMetricsTests runs SweepAsync live).

Fix constraints:

  • It must work on 2.28.1 (the current bundle, stores degraded after a failed update, bring-your-own) and on 2.29+.
  • On 2.29+, compressed data is no longer a chunk catalog row. Its relations must still be excluded from the catch-all rows (for example via _timescaledb_catalog.compression_settings.compress_relid), or they are counted twice: hypertable_detailed_size already includes them. On 2.30.1, 843,776 = 24,576 root + 819,200 chunk and compressed bytes.
  • A unit test pins the literal SQL (StoreSelfMetricsTests.cs ~348).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions