Skip to content
timescaledb

timescaledb

timescaledb : Enables scalable inserts and complex queries for time-series data

Overview

ID Extension Package Version Category License Language
1000
timescaledb
timescaledb
2.26.4
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
See Also
timescaledb_toolkit
timeseries
pg_cron
pg_partman
periods
temporal_tables
emaj
pg_task

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
2.26.4
18
17
16
15
14
timescaledb -
RPM
PIGSTY
2.26.4
18
17
16
15
14
timescaledb-tsl_$v -
DEB
PIGSTY
2.26.4
18
17
16
15
14
postgresql-$v-timescaledb-tsl -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
el8.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
el9.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
el9.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
el10.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
MISS
el10.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
MISS
d12.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
d12.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
d13.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
MISS
d13.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
MISS
u22.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
u22.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
u24.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
u24.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.19.3
u26.x86_64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
MISS
u26.aarch64
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
PIGSTY 2.26.4
MISS
Package Version OS ORG SIZE File URL
timescaledb-tsl_18 2.26.4 el8.x86_64 pigsty 825.1 KiB timescaledb-tsl_18-2.26.4-1PIGSTY.el8.x86_64.rpm
timescaledb-tsl_18 2.26.4 el8.x86_64 pgdg 753.8 KiB timescaledb-tsl_18-2.26.4-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.26.3 el8.x86_64 pgdg 750.8 KiB timescaledb-tsl_18-2.26.3-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.26.2 el8.x86_64 pgdg 751.5 KiB timescaledb-tsl_18-2.26.2-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.26.1 el8.x86_64 pgdg 750.5 KiB timescaledb-tsl_18-2.26.1-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.26.0 el8.x86_64 pgdg 749.8 KiB timescaledb-tsl_18-2.26.0-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.25.2 el8.x86_64 pgdg 730.2 KiB timescaledb-tsl_18-2.25.2-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.25.1 el8.x86_64 pgdg 727.5 KiB timescaledb-tsl_18-2.25.1-2PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.25.0 el8.x86_64 pgdg 726.5 KiB timescaledb-tsl_18-2.25.0-1PGDG.rhel8.10.x86_64.rpm
timescaledb-tsl_18 2.23.1 el8.x86_64 pgdg 733.6 KiB timescaledb-tsl_18-2.23.1-1PGDG.rhel8.x86_64.rpm
timescaledb-tsl_18 2.23.0 el8.x86_64 pgdg 733.3 KiB timescaledb-tsl_18-2.23.0-1PGDG.rhel8.x86_64.rpm
timescaledb-tsl_18 2.26.4 el8.aarch64 pigsty 756.3 KiB timescaledb-tsl_18-2.26.4-1PIGSTY.el8.aarch64.rpm
timescaledb-tsl_18 2.26.4 el9.x86_64 pigsty 748.0 KiB timescaledb-tsl_18-2.26.4-1PIGSTY.el9.x86_64.rpm
timescaledb-tsl_18 2.26.4 el9.x86_64 pgdg 729.6 KiB timescaledb-tsl_18-2.26.4-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.26.3 el9.x86_64 pgdg 728.1 KiB timescaledb-tsl_18-2.26.3-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.26.2 el9.x86_64 pgdg 727.4 KiB timescaledb-tsl_18-2.26.2-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.26.1 el9.x86_64 pgdg 728.0 KiB timescaledb-tsl_18-2.26.1-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.26.0 el9.x86_64 pgdg 723.9 KiB timescaledb-tsl_18-2.26.0-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.25.2 el9.x86_64 pgdg 702.5 KiB timescaledb-tsl_18-2.25.2-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.25.1 el9.x86_64 pgdg 700.7 KiB timescaledb-tsl_18-2.25.1-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.25.0 el9.x86_64 pgdg 699.8 KiB timescaledb-tsl_18-2.25.0-1PGDG.rhel9.7.x86_64.rpm
timescaledb-tsl_18 2.23.1 el9.x86_64 pgdg 719.4 KiB timescaledb-tsl_18-2.23.1-1PGDG.rhel9.x86_64.rpm
timescaledb-tsl_18 2.23.0 el9.x86_64 pgdg 715.8 KiB timescaledb-tsl_18-2.23.0-1PGDG.rhel9.x86_64.rpm
timescaledb-tsl_18 2.26.4 el9.aarch64 pigsty 709.8 KiB timescaledb-tsl_18-2.26.4-1PIGSTY.el9.aarch64.rpm
timescaledb-tsl_18 2.26.4 el10.x86_64 pigsty 779.8 KiB timescaledb-tsl_18-2.26.4-1PIGSTY.el10.x86_64.rpm
timescaledb-tsl_18 2.26.4 el10.x86_64 pgdg 758.4 KiB timescaledb-tsl_18-2.26.4-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.26.3 el10.x86_64 pgdg 754.5 KiB timescaledb-tsl_18-2.26.3-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.26.2 el10.x86_64 pgdg 757.5 KiB timescaledb-tsl_18-2.26.2-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.26.1 el10.x86_64 pgdg 757.3 KiB timescaledb-tsl_18-2.26.1-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.26.0 el10.x86_64 pgdg 755.7 KiB timescaledb-tsl_18-2.26.0-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.25.2 el10.x86_64 pgdg 731.4 KiB timescaledb-tsl_18-2.25.2-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.25.1 el10.x86_64 pgdg 727.8 KiB timescaledb-tsl_18-2.25.1-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.25.0 el10.x86_64 pgdg 727.8 KiB timescaledb-tsl_18-2.25.0-1PGDG.rhel10.1.x86_64.rpm
timescaledb-tsl_18 2.23.1 el10.x86_64 pgdg 743.3 KiB timescaledb-tsl_18-2.23.1-1PGDG.rhel10.x86_64.rpm
timescaledb-tsl_18 2.23.0 el10.x86_64 pgdg 741.3 KiB timescaledb-tsl_18-2.23.0-1PGDG.rhel10.x86_64.rpm
timescaledb-tsl_18 2.26.4 el10.aarch64 pigsty 728.2 KiB timescaledb-tsl_18-2.26.4-1PIGSTY.el10.aarch64.rpm
postgresql-18-timescaledb-tsl 2.26.4 d12.x86_64 pigsty 733.9 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~bookworm_amd64.deb
postgresql-18-timescaledb-tsl 2.26.4 d12.aarch64 pigsty 670.8 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~bookworm_arm64.deb
postgresql-18-timescaledb-tsl 2.26.4 d13.x86_64 pigsty 742.6 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~trixie_amd64.deb
postgresql-18-timescaledb-tsl 2.26.4 d13.aarch64 pigsty 680.6 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~trixie_arm64.deb
postgresql-18-timescaledb-tsl 2.26.4 u22.x86_64 pigsty 792.9 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~jammy_amd64.deb
postgresql-18-timescaledb-tsl 2.26.4 u22.aarch64 pigsty 759.0 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~jammy_arm64.deb
postgresql-18-timescaledb-tsl 2.26.4 u24.x86_64 pigsty 780.1 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~noble_amd64.deb
postgresql-18-timescaledb-tsl 2.26.4 u24.aarch64 pigsty 757.9 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~noble_arm64.deb
postgresql-18-timescaledb-tsl 2.26.4 u26.x86_64 pigsty 788.7 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~resolute_amd64.deb
postgresql-18-timescaledb-tsl 2.26.4 u26.aarch64 pigsty 774.5 KiB postgresql-18-timescaledb-tsl_2.26.4-1PIGSTY~resolute_arm64.deb

Source

pig build pkg timescaledb;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install timescaledb;		# install via package name, for the active PG version

pig install timescaledb -v 18;   # install for PG 18
pig install timescaledb -v 17;   # install for PG 17
pig install timescaledb -v 16;   # install for PG 16
pig install timescaledb -v 15;   # install for PG 15

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'timescaledb';

Create this extension with:

CREATE EXTENSION timescaledb;

Usage

Source: README, TimescaleDB 2.26.4 release, create_hypertable() API, CREATE TABLE hypertable API, continuous aggregates guide, add_job() API, add_columnstore_policy() API

timescaledb is a PostgreSQL extension for time-series and event analytics. The current docs emphasize hypertables, continuous aggregates, automation jobs, and moving older chunks into the columnstore.

Hypertables

CREATE EXTENSION timescaledb;

CREATE TABLE ts_test (
  ts timestamptz NOT NULL,
  id bigint,
  v integer
);

SELECT create_hypertable('ts_test', by_range('ts'));
  • create_hypertable() still works, but the API docs mark it as old since TimescaleDB 2.20.0 and point new users toward CREATE TABLE ... WITH (...).
  • The current README also shows the newer pattern: CREATE TABLE ... WITH (tsdb.hypertable).

Continuous aggregates and jobs

CREATE MATERIALIZED VIEW ts_hourly
WITH (timescaledb.continuous) AS
SELECT time_bucket('1 hour', ts) AS bucket,
       count(*) AS cnt,
       avg(v)   AS avg_v
FROM ts_test
GROUP BY bucket;

SELECT add_continuous_aggregate_policy(
  'ts_hourly',
  start_offset => INTERVAL '3 hours',
  end_offset => INTERVAL '1 hour',
  schedule_interval => INTERVAL '1 hour'
);

SELECT add_job('user_defined_action', '1h');
  • Continuous aggregates require time_bucket(...) on the hypertable’s time dimension.
  • In TimescaleDB 2.13 and later, real-time aggregates are disabled by default unless configured otherwise.

Columnstore

ALTER TABLE ts_test SET (
  timescaledb.enable_columnstore,
  timescaledb.orderby = 'ts DESC'
);

CALL add_columnstore_policy('ts_test', after => INTERVAL '1 day');
  • The docs treat add_columnstore_policy() and convert_to_columnstore() as the current APIs.
  • Older compression functions such as add_compression_policy() are documented as old APIs replaced by the columnstore interface.

Caveats

  • TimescaleDB 2.26.4 is a bug-fix release over 2.26.3; the release notes recommend upgrading but do not add a new SQL usage surface for hypertables, continuous aggregates, jobs, or columnstore.
  • Relevant 2.26.4 fixes touch continuous aggregate planning and refresh, runtime chunk exclusion, background worker restart after restore, sparse indexes on orderby, and compressed chunk merge safety. Keep using the documented APIs above rather than changing SQL for the patch release itself.
Last updated on