TimescaleDB
TimescaleDB adds time-series functionality and optimizations to PostgreSQL: hypertables, compression, continuous aggregates, and time-based partitioning. Thalassa Cloud provides TimescaleDB in the Apache-2 edition only — not the community edition. All features are under the Apache-2 license (no Timescale License). See also the feature comparision.
Check availability
SELECT name, default_version, installed_version, comment
FROM pg_available_extensions
WHERE name = 'timescaledb';Enable TimescaleDB
CREATE EXTENSION IF NOT EXISTS timescaledb;Verify installation
SELECT timescaledb_version();Basic usage
After enabling the extension, you can create hypertables and use TimescaleDB features:
-- Create a hypertable from a regular table
CREATE TABLE metrics (
time TIMESTAMPTZ NOT NULL,
device_id TEXT,
value DOUBLE PRECISION
);
SELECT create_hypertable('metrics', 'time');For full documentation, see the TimescaleDB documentation.
Enabling TimescaleDB
TimescaleDB requires preloaded configuration (shared_preload_libraries). If CREATE EXTENSION is not available for your database, enable TimescaleDB via the Thalassa Cloud API for databases instead, as the Thalassa Cloud DBaaS service will automatically configure this.
Your Database Cluster may restart when enabling/disabling this feature.
License
On Thalassa Cloud, TimescaleDB is provided in the Apache-2 edition only. Advanced features that require the Timescale License are not included.