Skip to content

Support for Timescale Hypertables #327

@khawarizmus

Description

@khawarizmus

Currently Powersync is unable to sync hypertables from Postgress extension TimescaleDB. For context @rkistner gave this explanation:

The short answer is that we don't have support for TimescaleDB yet.

While TimescaleDB is standard Postgres to a large extent, they mention that logical replication is not recommend with TimescaleDB: https://docs.timescale.com/self-hosted/latest/replication-and-ha/about-ha/#replication
I assume that's mostly because Hypertables aren't normal Postgres tables - they function a little like partitioned tables, but more complicated than that.

The underlying chunks are stored in physical Postgres tables, but some work is required to do the mappings. Debezium has some notes on how they handle that.

So in summary, it may be possible to support Hypertables in the future, but right now the data needs to be in a normal table for PowerSync to sync the data.

Source on Discord

This issue is to track any progress on that front and to also put visibility on the matter making easier for the team to triage.

Why Hypertables / Timeseries Data Matter

Many real-world apps (IoT, monitoring, analytics, finance, etc.) rely on hypertables because time-series data grows too fast for normal Postgres tables. Hypertables make inserts and queries efficient at scale, add retention/compression out of the box, and are the main reason people use TimescaleDB in the first place. Without support, the only option is duplicating data into plain tables, which is wasteful and defeats the purpose of TimescaleDB.

I am open for suggestions, alternatives or workarounds if any.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions