What's New in TimescaleDB 2.9?

What's New in TimescaleDB 2.9?

The latest version of TimescaleDB 2.9 is now available on Timescale Cloud and as an upgrade option for on-premise installations. This major release includes the following new features:

  • Hierarchical continuous aggregates: you can now create and use a continuous aggregate on top of another continuous aggregate.
  • Background jobs: introducing fixed schedules for background jobs and the ability to check and troubleshoot job errors.
  • Hyperfunction improvements: improved time_bucket_gapfill function allows to specify the time zone to a bucket.
  • Multi-node improvements: use of alter_data_node() to change the data node configuration. With this function, you can now configure the availability of the data node.

Let’s explore these improvements in more detail.

Welcome, Hierarchical Continuous Aggregates

With TimescaleDB 2.9 and its later versions, users can downsample their time-series data more efficiently and faster than before by creating continuous aggregate hierarchies.

Each hierarchical continuous aggregate is defined on top of the previous one, providing a lower granularity view of the same dataset while making the refresh process for higher-level continuous aggregates lightning-fast. This also enables TimescaleDB users to define more diverse sets of continuous aggregates without significant additional costs.

For example, a continuous aggregate providing a daily summary only needs to go through 24 records each time it is refreshed when built on top of a continuous aggregate that provides an hourly summary—forget those tens of thousands of records stored in the raw hypertable for that day.

Imagine that you have a finance dashboard, as shown in the example below. With hierarchical continuous aggregates, you can visualize your stock status by week by using pre-aggregated daily data (without going through raw data in the hypertable). This results in super fast response times, which prevent a laggy user experience of the dashboard.

Diagram example of hierarchical continuous aggregates functionality for a finance use case

For a more in-depth read about hierarchical continuous aggregates, their examples, and code snippets, read Chris Englebert’s blog post “An Incremental Materialized View on Steroids: How We Made Continuous Aggregates Even Better.”

More Scheduling Options and Better Visibility for Policies and User-defined Actions

TimescaleDB natively includes support for automation policies, such as the following:

Those policies, together with user-defined actions, are meant to run at regular intervals. At a high level, they are jobs scheduled to run asynchronously in the background, facilitated by our job scheduler.

With TimescaleDB 2.9, you can now set jobs to run at specific times by using our newly introduced fixed scheduling semantics. For example, by setting a continuous aggregate policy to start at 03:00 with a 24-hour schedule interval, the job will always be executed at 3:00 a.m. every day.

We also introduced better visibility by providing information about runtime errors encountered by jobs run by the automation framework.

Other Improvements in TimescaleDB

We also continued to improve the time_bucket_gapfill function to allow specifying the time zone to a bucket and introduced multi-node improvements. To be more precise, we improved the use of the alter_data_node() function by introducing the option to configure the availability of the data node.

Try TimescaleDB 2.9

If you are using Timescale Cloud, upgrades are automatic, and you’ll be upgraded to TimescaleDB 2.9.1 in your next maintenance window.

New to Timescale Cloud? Start a free 30-day trial, no credit card required, and get your new database journey started in five minutes.

If you’re self-hosting TimescaleDB, follow the upgrade instructions in our documentation.

The open-source relational database for time-series and analytics.
This post was written by
3 min read

Related posts