timescaledb
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
timescaledb | 2.29.1 | TIME | Timescale | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1000 | timescaledb | No | Yes | Yes | Yes | Yes | No | timescaledb_information |
| Related | timescaledb_toolkit timeseries pg_stl pg_partman pg_ttl_index citus pg_cron pg_ivm pg_incremental pg_trickle |
|---|
TimescaleDB 2.29 removes PostgreSQL 15 support
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.29.1 | 1817161514 | timescaledb | - |
| RPM | PIGSTY | 2.29.1 | 1817161514 | timescaledb-tsl_$v | - |
| DEB | PIGSTY | 2.29.1 | 1817161514 | postgresql-$v-timescaledb-tsl | - |
Build
You can build the RPM / DEB packages for timescaledb using pig build:
Install
You can install timescaledb directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources:
- TimescaleDB v2.29.1 README
- TimescaleDB 2.29.0 release
- TimescaleDB 2.29.1 security and bug-fix release
- TimescaleDB v2.29.1 control file
- CREATE TABLE API
- create_hypertable() API
- Continuous aggregate API
- add_columnstore_policy() API
- TimescaleDB GUCs
timescaledb is a PostgreSQL extension for time-series and event analytics. The current docs emphasize CREATE TABLE ... WITH (tsdb.hypertable), continuous aggregates, automation jobs, and moving chunks into the columnstore.
Hypertables
To convert an existing PostgreSQL table, use the generalized hypertable API:
CREATE TABLE ... WITH (tsdb.hypertable)has been documented since TimescaleDB 2.20.0 and is the best-practice path for new hypertables.- For TimescaleDB 2.23.0 and later, the first
TIMESTAMPorTIMESTAMPTZcolumn is selected automatically as the partition column unless more than one candidate makes the choice ambiguous. create_hypertable()still works for converting existing tables.
Continuous aggregates and jobs
- Continuous aggregates require
time_bucket(...)on the hypertable’s time dimension. - The continuous aggregate
WITHclause supportstimescaledb.materialized_only; the current API default isTRUE, so real-time aggregation is not enabled unless configured otherwise. - TimescaleDB 2.28.0 lets manual
refresh_continuous_aggregate()calls run incrementally in batches. Usebuckets_per_batch,max_batches_per_execution, andrefresh_newest_firstto break large manual refreshes into smaller work units. - TimescaleDB 2.28.0 also allows adding a new generated aggregate column to an existing continuous aggregate with
ALTER MATERIALIZED VIEW ... ADD COLUMN ... GENERATED ALWAYS AS (...) STORED; existing rows areNULLuntil refreshed.
Columnstore
CREATE TABLE ... WITH (tsdb.hypertable)enables columnstore by default unlesstsdb.columnstore = false.add_columnstore_policy()replaces the olderadd_compression_policy()API and requires eitherafterorcreated_before, not both.- Bloom filters are enabled by default for new columnstore chunks. Existing chunks need recompression before they have bloom indexes.
Relevant GUCs
timescaledb.enable_direct_compress_insert and timescaledb.enable_direct_compress_copy enable tech-preview direct compression during ingestion. TimescaleDB 2.27.0 adds timescaledb.enable_cagg_rewrites and timescaledb.cagg_rewrites_debug_info, and documents timescaledb.enable_columnar_scan_filter_pushdown as enabled by default.
Version 2.29.1 and Caveats
- TimescaleDB 2.29 supports PostgreSQL 16, 17, and 18. PostgreSQL 15 support ended with the 2.28 line, so upgrade PostgreSQL before moving a PG15 database to 2.29.
- Version 2.29.0 adds
compact_chunk()and a compaction policy for merging small columnstore batches, plus optimized DML chunk exclusion and small-LIMITcolumnstore scans. Review the release notes before enabling compaction policies on existing workloads. - The 2.29 line adds
alter_job(..., config_merge => ...), direct-compression and unordered-recompression controls, and concurrent refresh policies for hierarchical continuous aggregates. - Use 2.29.1 rather than 2.29.0. It fixes missing permission checks, malformed compressed-data handling, several crash paths, and validation of
compact_chunkbatch limits; upstream recommends upgrading all 2.29.0 installations. - The control file marks
timescaledbtrusted and non-relocatable. The server library still has to be preloaded and PostgreSQL restarted according to the packaged deployment configuration.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)