Skip to content

[Question]: Automatically recompress compressed chunks after delayed inserts (TimescaleDB 2.23.1) #9049

@vishvjit-at

Description

@vishvjit-at

Hi TimescaleDB team,

I’m using TimescaleDB 2.23.1 with compression enabled and a compression policy on older chunks.

I read the following blog post, which seems relevant to my use case of delayed data insertion into already compressed chunks:
https://www.tigerdata.com/blog/allowing-dml-operations-in-highly-compressed-time-series-data-in-postgresql

My scenario:

  • Old chunks are already compressed via a compression policy.
  • Occasionally, delayed data arrives for a time range that belongs to an already compressed chunk.
  • The data gets inserted, but the chunk size increases while is_compressed = true.
  • I would like the chunk to be automatically recompressed after such delayed inserts, without manual intervention.

My questions:

  1. How do I implement or enable automatic recompression when new data is inserted into an already compressed chunk?
  2. Does TimescaleDB automatically handle this via background jobs, or do I need to explicitly run recompress_chunk()?
  3. If manual recompression is required, what is the recommended production-safe approach to automate this for delayed data?

Thanks in advance for your guidance.

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