Skip to content

Commit 6a8b31f

Browse files
Release 2.15.1 (#6970)
This release contains performance improvements and bug fixes since the 2.15.0 release. Best practice is to upgrade at the next available opportunity. **Migrating from self-hosted TimescaleDB v2.14.x and earlier** After you run `ALTER EXTENSION`, you must run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql). For more details, see the following pull request [#6797](#6797). If you are migrating from TimescaleDB v2.15.0, no changes are required. **Bugfixes** * #6540: Segmentation fault when you backfill data using COPY into a compressed chunk. * #6858: `BEFORE UPDATE` trigger not working correctly. * #6908: Fix `time_bucket_gapfill()` with timezone behaviour around daylight savings time (DST) switches. * #6911: Fix dropped chunk metadata removal in the update script. * #6940: Fix `pg_upgrade` failure by removing `regprocedure` from the catalog table. * #6957: Fix the `segfault` in UNION queries that contain ordering on compressed chunks. **Thanks** * @DiAifU, @kiddhombre and @intermittentnrg for reporting the issues with gapfill and daylight saving time. * @edgarzamora for reporting the issue with update triggers. * @hongquan for reporting the issue with the update script. * @iliastsa and @SystemParadox for reporting the issue with COPY into a compressed chunk.
1 parent 2525b81 commit 6a8b31f

13 files changed

+134
-114
lines changed

.unreleased/fix_6858

-2
This file was deleted.

.unreleased/fix_6940

-1
This file was deleted.

.unreleased/fix_compressed_copy_segfault

-2
This file was deleted.

.unreleased/pr_6908

-2
This file was deleted.

.unreleased/pr_6911

-2
This file was deleted.

.unreleased/pr_6957

-1
This file was deleted.

CHANGELOG.md

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

7+
## 2.15.1 (2024-05-28)
8+
9+
This release contains performance improvements and bug fixes since
10+
the 2.15.0 release. Best practice is to upgrade at the next
11+
available opportunity.
12+
13+
**Migrating from self-hosted TimescaleDB v2.14.x and earlier**
14+
15+
After you run `ALTER EXTENSION`, you must run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql). For more details, see the following pull request [#6797](https://github.com/timescale/timescaledb/pull/6797).
16+
17+
If you are migrating from TimescaleDB v2.15.0, no changes are required.
18+
19+
**Bugfixes**
20+
* #6540: Segmentation fault when you backfill data using COPY into a compressed chunk.
21+
* #6858: `BEFORE UPDATE` trigger not working correctly.
22+
* #6908: Fix `time_bucket_gapfill()` with timezone behaviour around daylight savings time (DST) switches.
23+
* #6911: Fix dropped chunk metadata removal in the update script.
24+
* #6940: Fix `pg_upgrade` failure by removing `regprocedure` from the catalog table.
25+
* #6957: Fix the `segfault` in UNION queries that contain ordering on compressed chunks.
26+
27+
**Thanks**
28+
* @DiAifU, @kiddhombre and @intermittentnrg for reporting the issues with gapfill and daylight saving time.
29+
* @edgarzamora for reporting the issue with update triggers.
30+
* @hongquan for reporting the issue with the update script.
31+
* @iliastsa and @SystemParadox for reporting the issue with COPY into a compressed chunk.
32+
733
## 2.15.0 (2024-05-08)
834

935
This release contains performance improvements and bug fixes since
@@ -23,7 +49,9 @@ In addition, it includes these noteworthy features:
2349
* Recommend users to [migrate their old Continuous Aggregate format to the new one](https://docs.timescale.com/use-timescale/latest/continuous-aggregates/migrate/) because it support will be completely removed in next releases prevent them to migrate.
2450
* This is the last release supporting PostgreSQL 13.
2551

26-
**For on-premise users and this release only**, you will need to run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql) after running `ALTER EXTENSION`. More details can be found in the pull request [#6786](https://github.com/timescale/timescaledb/pull/6797).
52+
**Migrating from self-hosted TimescaleDB v2.14.x and earlier**
53+
54+
After you run `ALTER EXTENSION`, you must run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql). For more details, see the following pull request [#6797](https://github.com/timescale/timescaledb/pull/6797).
2755

2856
**Features**
2957
* #6382 Support for time_bucket with origin and offset in CAggs

sql/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ set(MOD_FILES
4646
updates/2.13.1--2.14.0.sql
4747
updates/2.14.0--2.14.1.sql
4848
updates/2.14.1--2.14.2.sql
49-
updates/2.14.2--2.15.0.sql)
49+
updates/2.14.2--2.15.0.sql
50+
updates/2.15.0--2.15.1.sql)
5051

5152
# The downgrade file to generate a downgrade script for the current version, as
5253
# specified in version.config
53-
set(CURRENT_REV_FILE 2.15.0--2.14.2.sql)
54+
set(CURRENT_REV_FILE 2.15.1--2.15.0.sql)
5455
# Files for generating old downgrade scripts. This should only include files for
5556
# downgrade from one version to its previous version since we do not support
5657
# skipping versions when downgrading.
@@ -88,7 +89,8 @@ set(OLD_REV_FILES
8889
2.14.0--2.13.1.sql
8990
2.14.1--2.14.0.sql
9091
2.14.2--2.14.1.sql
91-
2.15.0--2.14.2.sql)
92+
2.15.0--2.14.2.sql
93+
2.15.1--2.15.0.sql)
9294

9395
set(MODULE_PATHNAME "$libdir/timescaledb-${PROJECT_VERSION_MOD}")
9496
set(LOADER_PATHNAME "$libdir/timescaledb")

sql/updates/2.15.0--2.15.1.sql

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
CREATE TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function AS
2+
SELECT
3+
mat_hypertable_id,
4+
bucket_func::text AS bucket_func,
5+
bucket_width,
6+
bucket_origin,
7+
bucket_offset,
8+
bucket_timezone,
9+
bucket_fixed_width
10+
FROM
11+
_timescaledb_catalog.continuous_aggs_bucket_function
12+
ORDER BY
13+
mat_hypertable_id;
14+
15+
ALTER EXTENSION timescaledb
16+
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
17+
18+
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
19+
20+
CREATE TABLE _timescaledb_catalog.continuous_aggs_bucket_function (
21+
mat_hypertable_id integer NOT NULL,
22+
-- The bucket function
23+
bucket_func text NOT NULL,
24+
-- `bucket_width` argument of the function, e.g. "1 month"
25+
bucket_width text NOT NULL,
26+
-- optional `origin` argument of the function provided by the user
27+
bucket_origin text,
28+
-- optional `offset` argument of the function provided by the user
29+
bucket_offset text,
30+
-- optional `timezone` argument of the function provided by the user
31+
bucket_timezone text,
32+
-- fixed or variable sized bucket
33+
bucket_fixed_width bool NOT NULL,
34+
-- table constraints
35+
CONSTRAINT continuous_aggs_bucket_function_pkey PRIMARY KEY (mat_hypertable_id),
36+
CONSTRAINT continuous_aggs_bucket_function_mat_hypertable_id_fkey FOREIGN KEY (mat_hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE,
37+
CONSTRAINT continuous_aggs_bucket_function_func_check CHECK (pg_catalog.to_regprocedure(bucket_func) IS DISTINCT FROM 0)
38+
);
39+
40+
INSERT INTO _timescaledb_catalog.continuous_aggs_bucket_function
41+
SELECT * FROM _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
42+
43+
DROP TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
44+
45+
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.continuous_aggs_bucket_function', '');
46+
47+
GRANT SELECT ON TABLE _timescaledb_catalog.continuous_aggs_bucket_function TO PUBLIC;
48+
49+
ANALYZE _timescaledb_catalog.continuous_aggs_bucket_function;

sql/updates/2.15.1--2.15.0.sql

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
CREATE TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function AS
2+
SELECT
3+
mat_hypertable_id,
4+
pg_catalog.to_regprocedure(bucket_func) AS bucket_func,
5+
bucket_width,
6+
bucket_origin,
7+
bucket_offset,
8+
bucket_timezone,
9+
bucket_fixed_width
10+
FROM
11+
_timescaledb_catalog.continuous_aggs_bucket_function
12+
ORDER BY
13+
mat_hypertable_id;
14+
15+
ALTER EXTENSION timescaledb
16+
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
17+
18+
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
19+
20+
CREATE TABLE _timescaledb_catalog.continuous_aggs_bucket_function (
21+
mat_hypertable_id integer NOT NULL,
22+
-- The bucket function
23+
bucket_func regprocedure NOT NULL,
24+
-- `bucket_width` argument of the function, e.g. "1 month"
25+
bucket_width text NOT NULL,
26+
-- optional `origin` argument of the function provided by the user
27+
bucket_origin text,
28+
-- optional `offset` argument of the function provided by the user
29+
bucket_offset text,
30+
-- optional `timezone` argument of the function provided by the user
31+
bucket_timezone text,
32+
-- fixed or variable sized bucket
33+
bucket_fixed_width bool NOT NULL,
34+
-- table constraints
35+
CONSTRAINT continuous_aggs_bucket_function_pkey PRIMARY KEY (mat_hypertable_id),
36+
CONSTRAINT continuous_aggs_bucket_function_mat_hypertable_id_fkey FOREIGN KEY (mat_hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE
37+
);
38+
39+
INSERT INTO _timescaledb_catalog.continuous_aggs_bucket_function
40+
SELECT * FROM _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
41+
42+
DROP TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
43+
44+
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.continuous_aggs_bucket_function', '');
45+
46+
GRANT SELECT ON TABLE _timescaledb_catalog.continuous_aggs_bucket_function TO PUBLIC;
47+
48+
ANALYZE _timescaledb_catalog.continuous_aggs_bucket_function;

sql/updates/latest-dev.sql

-49
Original file line numberDiff line numberDiff line change
@@ -1,49 +0,0 @@
1-
CREATE TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function AS
2-
SELECT
3-
mat_hypertable_id,
4-
bucket_func::text AS bucket_func,
5-
bucket_width,
6-
bucket_origin,
7-
bucket_offset,
8-
bucket_timezone,
9-
bucket_fixed_width
10-
FROM
11-
_timescaledb_catalog.continuous_aggs_bucket_function
12-
ORDER BY
13-
mat_hypertable_id;
14-
15-
ALTER EXTENSION timescaledb
16-
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
17-
18-
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
19-
20-
CREATE TABLE _timescaledb_catalog.continuous_aggs_bucket_function (
21-
mat_hypertable_id integer NOT NULL,
22-
-- The bucket function
23-
bucket_func text NOT NULL,
24-
-- `bucket_width` argument of the function, e.g. "1 month"
25-
bucket_width text NOT NULL,
26-
-- optional `origin` argument of the function provided by the user
27-
bucket_origin text,
28-
-- optional `offset` argument of the function provided by the user
29-
bucket_offset text,
30-
-- optional `timezone` argument of the function provided by the user
31-
bucket_timezone text,
32-
-- fixed or variable sized bucket
33-
bucket_fixed_width bool NOT NULL,
34-
-- table constraints
35-
CONSTRAINT continuous_aggs_bucket_function_pkey PRIMARY KEY (mat_hypertable_id),
36-
CONSTRAINT continuous_aggs_bucket_function_mat_hypertable_id_fkey FOREIGN KEY (mat_hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE,
37-
CONSTRAINT continuous_aggs_bucket_function_func_check CHECK (pg_catalog.to_regprocedure(bucket_func) IS DISTINCT FROM 0)
38-
);
39-
40-
INSERT INTO _timescaledb_catalog.continuous_aggs_bucket_function
41-
SELECT * FROM _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
42-
43-
DROP TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
44-
45-
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.continuous_aggs_bucket_function', '');
46-
47-
GRANT SELECT ON TABLE _timescaledb_catalog.continuous_aggs_bucket_function TO PUBLIC;
48-
49-
ANALYZE _timescaledb_catalog.continuous_aggs_bucket_function;

sql/updates/reverse-dev.sql

-48
Original file line numberDiff line numberDiff line change
@@ -1,48 +0,0 @@
1-
CREATE TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function AS
2-
SELECT
3-
mat_hypertable_id,
4-
pg_catalog.to_regprocedure(bucket_func) AS bucket_func,
5-
bucket_width,
6-
bucket_origin,
7-
bucket_offset,
8-
bucket_timezone,
9-
bucket_fixed_width
10-
FROM
11-
_timescaledb_catalog.continuous_aggs_bucket_function
12-
ORDER BY
13-
mat_hypertable_id;
14-
15-
ALTER EXTENSION timescaledb
16-
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
17-
18-
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;
19-
20-
CREATE TABLE _timescaledb_catalog.continuous_aggs_bucket_function (
21-
mat_hypertable_id integer NOT NULL,
22-
-- The bucket function
23-
bucket_func regprocedure NOT NULL,
24-
-- `bucket_width` argument of the function, e.g. "1 month"
25-
bucket_width text NOT NULL,
26-
-- optional `origin` argument of the function provided by the user
27-
bucket_origin text,
28-
-- optional `offset` argument of the function provided by the user
29-
bucket_offset text,
30-
-- optional `timezone` argument of the function provided by the user
31-
bucket_timezone text,
32-
-- fixed or variable sized bucket
33-
bucket_fixed_width bool NOT NULL,
34-
-- table constraints
35-
CONSTRAINT continuous_aggs_bucket_function_pkey PRIMARY KEY (mat_hypertable_id),
36-
CONSTRAINT continuous_aggs_bucket_function_mat_hypertable_id_fkey FOREIGN KEY (mat_hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE
37-
);
38-
39-
INSERT INTO _timescaledb_catalog.continuous_aggs_bucket_function
40-
SELECT * FROM _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
41-
42-
DROP TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function;
43-
44-
SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.continuous_aggs_bucket_function', '');
45-
46-
GRANT SELECT ON TABLE _timescaledb_catalog.continuous_aggs_bucket_function TO PUBLIC;
47-
48-
ANALYZE _timescaledb_catalog.continuous_aggs_bucket_function;

version.config

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = 2.15.0
2-
update_from_version = 2.14.2
3-
downgrade_to_version = 2.14.2
1+
version = 2.15.1
2+
update_from_version = 2.15.0
3+
downgrade_to_version = 2.15.0

0 commit comments

Comments
 (0)