Skip to content

Commit 19d7f66

Browse files
pallavisontakkesvenklemm
authored andcommitted
Release 2.18.0
This release introduces the ability to add secondary indexes to the columnstore, improves group by and filtering performance through columnstore vectorization, and contains the highly upvoted community request of transition table support. We recommend that you upgrade at the next available opportunity. **Highlighted features in TimescaleDB v2.18.0** * The ability to add secondary indexes to the columnstore through the new hypercore table access method. * Significant performance improvements through vectorization (`SIMD`) for aggregations using a group by with one column and/or using a filter clause when querying the columnstore. * Hypertables support triggers for transition tables, which is one of the most upvoted community feature requests. * Updated methods to manage Timescale's hybrid row-columnar store (hypercore) that highlight the usage of the columnstore which includes both an optimized columnar format as well as compression. **Dropping support for Bitnami images** After the recent change in Bitnami’s [LTS support policy](bitnami/containers#75671), we are no longer building Bitnami images for TimescaleDB. We recommend using the [official TimescaleDB Docker image](https://hub.docker.com/r/timescale/timescaledb-ha) **Deprecation Notice** We are deprecating the following parameters, functions, procedures and views. They will be removed with the next major release of TimescaleDB. Please find the replacements in the table below: | Deprecated | Replacement | Type | | --- | --- | --- | | decompress_chunk | convert_to_rowstore | Procedure | | compress_chunk | convert_to_columnstore | Procedure | | add_compression_policy | add_columnstore_policy | Function | | remove_compression_policy | remove_columnstore_policy | Function | | hypertable_compression_stats | hypertable_columnstore_stats | Function | | chunk_compression_stats | chunk_columnstore_stats | Function | | hypertable_compression_settings | hypertable_columnstore_settings | View | | chunk_compression_settings | chunk_columnstore_settings | View | | compression_settings | columnstore_settings | View | | timescaledb.compress | timescaledb.enable_columnstore | Parameter | | timescaledb.compress_segmentby | timescaledb.segmentby | Parameter | | timescaledb.compress_orderby | timescaledb.orderby | Parameter | **Features** * timescale#7341: Vectorized aggregation with grouping by one fixed-size by-value compressed column (such as arithmetic types). * timescale#7104: Hypercore table access method. * timescale#6901: Add hypertable support for transition tables. * timescale#7482: Optimize recompression of partially compressed chunks. * timescale#7458: Support vectorized aggregation with aggregate `filter` clauses that are also vectorizable. * timescale#7433: Add support for merging chunks. * timescale#7271: Push down `order by` in real-time continuous aggregate queries. * timescale#7455: Support `drop not null` on compressed hypertables. * timescale#7295: Support `alter table set access method` on hypertable. * timescale#7411: Change parameter name to enable hypercore table access method. * timescale#7436: Add index creation on `order by` columns. * timescale#7443: Add hypercore function and view aliases. * timescale#7521: Add optional `force` argument to `refresh_continuous_aggregate`. * timescale#7528: Transform sorting on `time_bucket` to sorting on time for compressed chunks in some cases. * timescale#7565: Add hint when hypertable creation fails. * timescale#7390: Disable custom `hashagg` planner code. * timescale#7587: Add `include_tiered_data` parameter to `add_continuous_aggregate_policy` API. * timescale#7486: Prevent building against PostgreSQL versions with broken ABI. * timescale#7412: Add [GUC](https://www.postgresql.org/docs/current/acronyms.html#:~:text=GUC) for the `hypercore_use_access_method` default. * timescale#7413: Add GUC for segmentwise recompression. **Bugfixes** * timescale#7378: Remove obsolete job referencing `policy_job_error_retention`. * timescale#7409: Update `bgw_job` table when altering procedure. * timescale#7410: Fix the `aggregated compressed column not found` error on aggregation query. * timescale#7426: Fix `datetime` parsing error in chunk constraint creation. * timescale#7432: Verify that the heap tuple is valid before using. * timescale#7434: Fix the segfault when internally setting the replica identity for a given chunk. * timescale#7488: Emit error for transition table trigger on chunks. * timescale#7514: Fix the error: `invalid child of chunk append`. * timescale#7517: Fix the performance regression on the `cagg_migrate` procedure. * timescale#7527: Restart scheduler on error. * timescale#7557: Fix null handling for in-memory tuple filtering. * timescale#7566: Improve transaction check in CAGG refresh. * timescale#7584: Fix NaN-handling for vectorized aggregation. * timescale#7598: Match the Postgres NaN comparison behavior in WHERE clause over compressed tables. **Thanks** * @bharrisau for reporting the segfault when creating chunks. * @jakehedlund for reporting the incompatible NaN behavior in WHERE clause over compressed tables. * @k-rus for suggesting that we add a hint when hypertable creation fails. * @staticlibs for sending the pull request that improves the transaction check in CAGG refresh. * @uasiddiqi for reporting the `aggregated compressed column not found` error.
1 parent bbf183c commit 19d7f66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+336
-293
lines changed

.unreleased/compressed-sort-transform

-1
This file was deleted.

.unreleased/nan-vectorized-filters

-2
This file was deleted.

.unreleased/pr_6901

-1
This file was deleted.

.unreleased/pr_7104

-1
This file was deleted.

.unreleased/pr_7271

-1
This file was deleted.

.unreleased/pr_7295

-1
This file was deleted.

.unreleased/pr_7378

-2
This file was deleted.

.unreleased/pr_7390

-1
This file was deleted.

.unreleased/pr_7409

-1
This file was deleted.

.unreleased/pr_7411

-1
This file was deleted.

.unreleased/pr_7412

-1
This file was deleted.

.unreleased/pr_7413

-1
This file was deleted.

.unreleased/pr_7426

-1
This file was deleted.

.unreleased/pr_7432

-1
This file was deleted.

.unreleased/pr_7433

-1
This file was deleted.

.unreleased/pr_7434

-2
This file was deleted.

.unreleased/pr_7436

-1
This file was deleted.

.unreleased/pr_7443

-1
This file was deleted.

.unreleased/pr_7455

-1
This file was deleted.

.unreleased/pr_7482

-1
This file was deleted.

.unreleased/pr_7486

-1
This file was deleted.

.unreleased/pr_7488

-1
This file was deleted.

.unreleased/pr_7514

-1
This file was deleted.

.unreleased/pr_7517

-1
This file was deleted.

.unreleased/pr_7521

-1
This file was deleted.

.unreleased/pr_7527

-1
This file was deleted.

.unreleased/pr_7557

-1
This file was deleted.

.unreleased/pr_7565

-2
This file was deleted.

.unreleased/pr_7566

-2
This file was deleted.

.unreleased/pr_7584

-1
This file was deleted.

.unreleased/pr_7587

-1
This file was deleted.

.unreleased/resolve-vars

-2
This file was deleted.

.unreleased/vectorized-agg-filter

-1
This file was deleted.

.unreleased/vectorized-grouping-one-fixed

-1
This file was deleted.

CHANGELOG.md

+81
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,87 @@
44
`psql` with the `-X` flag to prevent any `.psqlrc` commands from
55
accidentally triggering the load of a previous DB version.**
66

7+
8+
## 2.18.0 (2025-01-23)
9+
10+
This release introduces the ability to add secondary indexes to the columnstore, improves group by and filtering performance through columnstore vectorization, and contains the highly upvoted community request of transition table support. We recommend that you upgrade at the next available opportunity.
11+
12+
**Highlighted features in TimescaleDB v2.18.0**
13+
14+
* The ability to add secondary indexes to the columnstore through the new hypercore table access method.
15+
* Significant performance improvements through vectorization (`SIMD`) for aggregations using a group by with one column and/or using a filter clause when querying the columnstore.
16+
* Hypertables support triggers for transition tables, which is one of the most upvoted community feature requests.
17+
* Updated methods to manage Timescale's hybrid row-columnar store (hypercore) that highlight the usage of the columnstore which includes both an optimized columnar format as well as compression.
18+
19+
**Dropping support for Bitnami images**
20+
21+
After the recent change in Bitnami’s [LTS support policy](https://github.com/bitnami/containers/issues/75671), we are no longer building Bitnami images for TimescaleDB. We recommend using the [official TimescaleDB Docker image](https://hub.docker.com/r/timescale/timescaledb-ha)
22+
23+
**Deprecation Notice**
24+
25+
We are deprecating the following parameters, functions, procedures and views. They will be removed with the next major release of TimescaleDB. Please find the replacements in the table below:
26+
27+
| Deprecated | Replacement | Type |
28+
| --- | --- | --- |
29+
| decompress_chunk | convert_to_rowstore | Procedure |
30+
| compress_chunk | convert_to_columnstore | Procedure |
31+
| add_compression_policy | add_columnstore_policy | Function |
32+
| remove_compression_policy | remove_columnstore_policy | Function |
33+
| hypertable_compression_stats | hypertable_columnstore_stats | Function |
34+
| chunk_compression_stats | chunk_columnstore_stats | Function |
35+
| hypertable_compression_settings | hypertable_columnstore_settings | View |
36+
| chunk_compression_settings | chunk_columnstore_settings | View |
37+
| compression_settings | columnstore_settings | View |
38+
| timescaledb.compress | timescaledb.enable_columnstore | Parameter |
39+
| timescaledb.compress_segmentby | timescaledb.segmentby | Parameter |
40+
| timescaledb.compress_orderby | timescaledb.orderby | Parameter |
41+
42+
**Features**
43+
* #7341: Vectorized aggregation with grouping by one fixed-size by-value compressed column (such as arithmetic types).
44+
* #7104: Hypercore table access method.
45+
* #6901: Add hypertable support for transition tables.
46+
* #7482: Optimize recompression of partially compressed chunks.
47+
* #7458: Support vectorized aggregation with aggregate `filter` clauses that are also vectorizable.
48+
* #7433: Add support for merging chunks.
49+
* #7271: Push down `order by` in real-time continuous aggregate queries.
50+
* #7455: Support `drop not null` on compressed hypertables.
51+
* #7295: Support `alter table set access method` on hypertable.
52+
* #7411: Change parameter name to enable hypercore table access method.
53+
* #7436: Add index creation on `order by` columns.
54+
* #7443: Add hypercore function and view aliases.
55+
* #7521: Add optional `force` argument to `refresh_continuous_aggregate`.
56+
* #7528: Transform sorting on `time_bucket` to sorting on time for compressed chunks in some cases.
57+
* #7565: Add hint when hypertable creation fails.
58+
* #7390: Disable custom `hashagg` planner code.
59+
* #7587: Add `include_tiered_data` parameter to `add_continuous_aggregate_policy` API.
60+
* #7486: Prevent building against PostgreSQL versions with broken ABI.
61+
* #7412: Add [GUC](https://www.postgresql.org/docs/current/acronyms.html#:~:text=GUC) for the `hypercore_use_access_method` default.
62+
* #7413: Add GUC for segmentwise recompression.
63+
64+
**Bugfixes**
65+
* #7378: Remove obsolete job referencing `policy_job_error_retention`.
66+
* #7409: Update `bgw_job` table when altering procedure.
67+
* #7410: Fix the `aggregated compressed column not found` error on aggregation query.
68+
* #7426: Fix `datetime` parsing error in chunk constraint creation.
69+
* #7432: Verify that the heap tuple is valid before using.
70+
* #7434: Fix the segfault when internally setting the replica identity for a given chunk.
71+
* #7488: Emit error for transition table trigger on chunks.
72+
* #7514: Fix the error: `invalid child of chunk append`.
73+
* #7517: Fix the performance regression on the `cagg_migrate` procedure.
74+
* #7527: Restart scheduler on error.
75+
* #7557: Fix null handling for in-memory tuple filtering.
76+
* #7566: Improve transaction check in CAGG refresh.
77+
* #7584: Fix NaN-handling for vectorized aggregation.
78+
* #7598: Match the Postgres NaN comparison behavior in WHERE clause over compressed tables.
79+
80+
**Thanks**
81+
* @bharrisau for reporting the segfault when creating chunks.
82+
* @jakehedlund for reporting the incompatible NaN behavior in WHERE clause over compressed tables.
83+
* @k-rus for suggesting that we add a hint when hypertable creation fails.
84+
* @staticlibs for sending the pull request that improves the transaction check in CAGG refresh.
85+
* @uasiddiqi for reporting the `aggregated compressed column not found` error.
86+
87+
788
## 2.17.2 (2024-11-06)
889

990
This release contains bug fixes since the 2.17.1 release. We recommend that you

sql/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ set(MOD_FILES
4545
updates/2.16.0--2.16.1.sql
4646
updates/2.16.1--2.17.0.sql
4747
updates/2.17.0--2.17.1.sql
48-
updates/2.17.1--2.17.2.sql)
48+
updates/2.17.1--2.17.2.sql
49+
updates/2.17.2--2.18.0.sql)
4950

5051
# The downgrade file to generate a downgrade script for the current version, as
5152
# specified in version.config
52-
set(CURRENT_REV_FILE reverse-dev.sql)
53+
set(CURRENT_REV_FILE 2.18.0--2.17.2.sql)
5354
# Files for generating old downgrade scripts. This should only include files for
5455
# downgrade from one version to its previous version since we do not support
5556
# skipping versions when downgrading.
@@ -90,7 +91,8 @@ set(OLD_REV_FILES
9091
2.16.1--2.16.0.sql
9192
2.17.0--2.16.1.sql
9293
2.17.1--2.17.0.sql
93-
2.17.2--2.17.1.sql)
94+
2.17.2--2.17.1.sql
95+
2.18.0--2.17.2.sql)
9496

9597
set(MODULE_PATHNAME "$libdir/timescaledb-${PROJECT_VERSION_MOD}")
9698
set(LOADER_PATHNAME "$libdir/timescaledb")

sql/updates/2.17.2--2.18.0.sql

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
-- remove obsolete job
2+
DELETE FROM _timescaledb_config.bgw_job WHERE id = 2;
3+
4+
-- Hypercore updates
5+
CREATE FUNCTION _timescaledb_debug.is_compressed_tid(tid) RETURNS BOOL
6+
AS '@MODULE_PATHNAME@', 'ts_update_placeholder' LANGUAGE C STRICT;
7+
8+
DROP FUNCTION IF EXISTS @[email protected]_chunk(uncompressed_chunk REGCLASS, if_not_compressed BOOLEAN, recompress BOOLEAN);
9+
10+
CREATE FUNCTION @[email protected]_chunk(
11+
uncompressed_chunk REGCLASS,
12+
if_not_compressed BOOLEAN = true,
13+
recompress BOOLEAN = false,
14+
hypercore_use_access_method BOOL = NULL
15+
) RETURNS REGCLASS AS '@MODULE_PATHNAME@', 'ts_update_placeholder' LANGUAGE C VOLATILE;
16+
17+
DROP FUNCTION IF EXISTS @[email protected]_compression_policy(hypertable REGCLASS, compress_after "any", if_not_exists BOOL, schedule_interval INTERVAL, initial_start TIMESTAMPTZ, timezone TEXT, compress_created_before INTERVAL);
18+
19+
CREATE FUNCTION @[email protected]_compression_policy(
20+
hypertable REGCLASS,
21+
compress_after "any" = NULL,
22+
if_not_exists BOOL = false,
23+
schedule_interval INTERVAL = NULL,
24+
initial_start TIMESTAMPTZ = NULL,
25+
timezone TEXT = NULL,
26+
compress_created_before INTERVAL = NULL,
27+
hypercore_use_access_method BOOL = NULL
28+
)
29+
RETURNS INTEGER
30+
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
31+
LANGUAGE C VOLATILE;
32+
33+
DROP FUNCTION IF EXISTS timescaledb_experimental.add_policies(relation REGCLASS, if_not_exists BOOL, refresh_start_offset "any", refresh_end_offset "any", compress_after "any", drop_after "any");
34+
35+
CREATE FUNCTION timescaledb_experimental.add_policies(
36+
relation REGCLASS,
37+
if_not_exists BOOL = false,
38+
refresh_start_offset "any" = NULL,
39+
refresh_end_offset "any" = NULL,
40+
compress_after "any" = NULL,
41+
drop_after "any" = NULL,
42+
hypercore_use_access_method BOOL = NULL)
43+
RETURNS BOOL
44+
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
45+
LANGUAGE C VOLATILE;
46+
47+
DROP PROCEDURE IF EXISTS _timescaledb_functions.policy_compression_execute(job_id INTEGER, htid INTEGER, lag ANYELEMENT, maxchunks INTEGER, verbose_log BOOLEAN, recompress_enabled BOOLEAN, use_creation_time BOOLEAN);
48+
49+
DROP PROCEDURE IF EXISTS _timescaledb_functions.policy_compression(job_id INTEGER, config JSONB);
50+
51+
CREATE PROCEDURE @[email protected]_to_columnstore(
52+
chunk REGCLASS,
53+
if_not_columnstore BOOLEAN = true,
54+
recompress BOOLEAN = false,
55+
hypercore_use_access_method BOOL = NULL)
56+
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
57+
LANGUAGE C;
58+
59+
CREATE PROCEDURE @[email protected]_to_rowstore(
60+
chunk REGCLASS,
61+
if_columnstore BOOLEAN = true)
62+
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
63+
LANGUAGE C;
64+
65+
CREATE PROCEDURE @[email protected]_columnstore_policy(
66+
hypertable REGCLASS,
67+
after "any" = NULL,
68+
if_not_exists BOOL = false,
69+
schedule_interval INTERVAL = NULL,
70+
initial_start TIMESTAMPTZ = NULL,
71+
timezone TEXT = NULL,
72+
created_before INTERVAL = NULL,
73+
hypercore_use_access_method BOOL = NULL
74+
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';
75+
76+
CREATE PROCEDURE @[email protected]_columnstore_policy(
77+
hypertable REGCLASS,
78+
if_exists BOOL = false
79+
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';
80+
81+
CREATE FUNCTION @[email protected]_columnstore_stats (hypertable REGCLASS)
82+
RETURNS TABLE (
83+
chunk_schema name,
84+
chunk_name name,
85+
compression_status text,
86+
before_compression_table_bytes bigint,
87+
before_compression_index_bytes bigint,
88+
before_compression_toast_bytes bigint,
89+
before_compression_total_bytes bigint,
90+
after_compression_table_bytes bigint,
91+
after_compression_index_bytes bigint,
92+
after_compression_toast_bytes bigint,
93+
after_compression_total_bytes bigint,
94+
node_name name)
95+
LANGUAGE SQL
96+
STABLE STRICT
97+
AS 'SELECT * FROM @[email protected]_compression_stats($1)'
98+
SET search_path TO pg_catalog, pg_temp;
99+
100+
CREATE FUNCTION @[email protected]_columnstore_stats (hypertable REGCLASS)
101+
RETURNS TABLE (
102+
total_chunks bigint,
103+
number_compressed_chunks bigint,
104+
before_compression_table_bytes bigint,
105+
before_compression_index_bytes bigint,
106+
before_compression_toast_bytes bigint,
107+
before_compression_total_bytes bigint,
108+
after_compression_table_bytes bigint,
109+
after_compression_index_bytes bigint,
110+
after_compression_toast_bytes bigint,
111+
after_compression_total_bytes bigint,
112+
node_name name)
113+
LANGUAGE SQL
114+
STABLE STRICT
115+
AS 'SELECT * FROM @[email protected]_compression_stats($1)'
116+
SET search_path TO pg_catalog, pg_temp;
117+
118+
-- Recreate `refresh_continuous_aggregate` procedure to add `force` argument
119+
DROP PROCEDURE IF EXISTS @[email protected]_continuous_aggregate (continuous_aggregate REGCLASS, window_start "any", window_end "any");
120+
121+
CREATE PROCEDURE @[email protected]_continuous_aggregate(
122+
continuous_aggregate REGCLASS,
123+
window_start "any",
124+
window_end "any",
125+
force BOOLEAN = FALSE
126+
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';
127+
128+
-- Add `include_tiered_data` argument to `add_continuous_aggregate_policy`
129+
DROP FUNCTION @[email protected]_continuous_aggregate_policy(
130+
continuous_aggregate REGCLASS, start_offset "any",
131+
end_offset "any", schedule_interval INTERVAL,
132+
if_not_exists BOOL,
133+
initial_start TIMESTAMPTZ,
134+
timezone TEXT
135+
);
136+
CREATE FUNCTION @[email protected]_continuous_aggregate_policy(
137+
continuous_aggregate REGCLASS, start_offset "any",
138+
end_offset "any", schedule_interval INTERVAL,
139+
if_not_exists BOOL = false,
140+
initial_start TIMESTAMPTZ = NULL,
141+
timezone TEXT = NULL,
142+
include_tiered_data BOOL = NULL
143+
)
144+
RETURNS INTEGER
145+
AS '@MODULE_PATHNAME@', 'ts_update_placeholder'
146+
LANGUAGE C VOLATILE;
147+
148+
-- Merge chunks
149+
CREATE PROCEDURE @[email protected]_chunks(
150+
chunk1 REGCLASS, chunk2 REGCLASS
151+
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';
152+
153+
CREATE PROCEDURE @[email protected]_chunks(
154+
chunks REGCLASS[]
155+
) LANGUAGE C AS '@MODULE_PATHNAME@', 'ts_update_placeholder';

0 commit comments

Comments
 (0)