timescaledb
timescaledb : Enables scalable inserts and complex queries for time-series data
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 1000 | timescaledb | timescaledb | 2.32.1 |
TIME | Timescale | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLdt- | No | Yes | Yes | Yes | no | yes |
| Relationships | |
|---|---|
| Schemas | timescaledb_information timescaledb_experimental _timescaledb_catalog _timescaledb_config _timescaledb_functions _timescaledb_internal _timescaledb_cache |
| See Also | timescaledb_toolkit timeseries pg_stl pg_partman pg_ttl_index citus pg_cron pg_ivm pg_incremental pg_trickle |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| el8.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| el9.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| el9.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| el10.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| el10.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| d12.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| d12.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| d13.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| d13.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| u22.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| u22.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| u24.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| u24.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| u26.x86_64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
| u26.aarch64 | N/A | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.32.1 | PIGSTY 2.28.3 |
Source
github.com/timescale/timescaledb
timescaledb-2.32.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
Sources:
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.
Enable the Extension
Append timescaledb to the existing preload list and restart PostgreSQL before creating the extension. Version 2.30.2 supports PostgreSQL 16, 17, and 18.
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.30.2 and Upgrades
- 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. - The 2.30 line adds
DeferredChunkAppendfor LIMIT queries and concurrent compaction DML. Version 2.30.2 fixes chunk-merge and compressed-query crashes, orphaned compressed chunks after schema removal, and non-deterministic text-collation handling. Granular-refresh option names now use thetimescaledb.cagg_granular_refresh_*prefix; review any existing granular-refresh configuration. - 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.
Install the matching package, then use a fresh psql -X connection for the migration so startup commands do not load an older library first. Apply the update in each database and verify its SQL version:
Version 2.32.0 upgrade boundaries
The 2.32.0 release is compatible only up to PostgreSQL 18.6, 17.11 and 16.15. Upstream instructs users to reach TimescaleDB 2.32.1 before upgrading beyond those PostgreSQL minor versions; do not use 2.32.0 to approve an unrestricted PostgreSQL minor upgrade. Install matching extension files and restart PostgreSQL for the loader changes, then update each database’s extension through its supported path.
This release checks database ownership before stopping or restarting background workers and runs the scheduler and telemetry jobs as the database owner. Review that role’s privileges. It also fixes concurrent UPDATE/DELETE skipping rows under READ COMMITTED, missing final continuous-aggregate buckets, and compression crashes. Adaptive Integer Compression is enabled by default. The upgrade removes the internal bloom1_contains helper; application code should not depend on internal APIs.
Version 2.32.1
Upgrade TimescaleDB to 2.32.1 before moving PostgreSQL to 16.16, 17.12 or 18.7 and later minor versions. Earlier TimescaleDB patches can fail every scheduler job on those server versions. Version 2.32.1 also remains compatible with the preceding minor releases; it supersedes the 2.32.0 restriction above.
The release repairs job-crash backoff and commits inside run_job, and performs chunk/index/continuous-aggregate operations using the appropriate caller or owner instead of unnecessarily switching to the catalog owner. Ownership is checked before validating a unique index on a compressed chunk. Review application-role permissions and scheduled-job results after the upgrade.
Install matching files, follow the preload-library restart procedure, and use a fresh psql -X session in each database: