Skip to content

Commit

Permalink
Release 2.15.1
Browse files Browse the repository at this point in the history
This release contains bug fixes since the 2.15.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* #6540 Segmentation fault when backfilling data with COPY into a compressed chunk
* #6858 Before update trigger not working correctly
* #6908 Fix gapfill with timezone behaviour around dst switches
* #6911 Fix dropped chunk metadata removal in update script
* #6940 Fix `pg_upgrade` failure by removing `regprocedure` from catalog table
* #6957 Fix segfault in UNION queries with ordering on compressed chunks

**Thanks**
* @DiAifU, @kiddhombre and @intermittentnrg for reporting issues with gapfill and daylight saving time
* @edgarzamora for reporting issue with update triggers
* @hongquan for reporting an issue with the update script
* @iliastsa and @SystemParadox for reporting an issue with COPY into a compressed chunk
  • Loading branch information
fabriziomello committed May 29, 2024
1 parent 442e536 commit e0a21a0
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 104 deletions.
2 changes: 0 additions & 2 deletions .unreleased/fix_6858

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/fix_6940

This file was deleted.

2 changes: 0 additions & 2 deletions .unreleased/fix_compressed_copy_segfault

This file was deleted.

2 changes: 0 additions & 2 deletions .unreleased/pr_6908

This file was deleted.

2 changes: 0 additions & 2 deletions .unreleased/pr_6911

This file was deleted.

1 change: 0 additions & 1 deletion .unreleased/pr_6957

This file was deleted.

2 changes: 1 addition & 1 deletion .unreleased/template.release_notes_header.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## {{ release_current }} ({{ release_date }})

This release contains performance improvements and bug fixes since
the {{ release_previous }} release. We recommend that you upgrade at the next
the {{ release_previous }} release. Best practice is to upgrade at the next
available opportunity.

In addition, it includes these noteworthy features:
Expand Down
111 changes: 69 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,35 @@
`psql` with the `-X` flag to prevent any `.psqlrc` commands from
accidentally triggering the load of a previous DB version.**

## 2.15.1 (2024-05-28)

This release contains 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](https://github.com/timescale/timescaledb/pull/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 then `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.

## 2.15.0 (2024-05-08)

This release contains performance improvements and bug fixes since
the 2.14.2 release. We recommend that you upgrade at the next
the 2.14.2 release. Best practice is to upgrade at the next
available opportunity.

In addition, it includes these noteworthy features:
Expand All @@ -23,50 +48,52 @@ In addition, it includes these noteworthy features:
* 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.
* This is the last release supporting PostgreSQL 13.

**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).
**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](https://github.com/timescale/timescaledb/pull/6797).

**Features**
* #6382 Support for time_bucket with origin and offset in CAggs
* #6696 Improve defaults for compression segment_by and order_by
* #6705 Add sparse minmax indexes for compressed columns that have uncompressed btree indexes
* #6754 Allow DROP CONSTRAINT on compressed hypertables
* #6767 Add metadata table `_timestaledb_internal.bgw_job_stat_history` for tracking job execution history
* #6798 Prevent usage of deprecated time_bucket_ng in CAgg definition
* #6810 Add telemetry for access methods
* #6811 Remove no longer relevant timescaledb.allow_install_without_preload GUC
* #6837 Add migration path for CAggs using time_bucket_ng
* #6865 Update the watermark when truncating a CAgg

**Bugfixes**
* #6617 Fix error in show_chunks
* #6621 Remove metadata when dropping chunks
* #6677 Fix snapshot usage in CAgg invalidation scanner
* #6698 Define meaning of 0 retries for jobs as no retries
* #6717 Fix handling of compressed tables with primary or unique index in COPY path
* #6726 Fix constify cagg_watermark using window function when querying a CAgg
* #6729 Fix NULL start value handling in CAgg refresh
* #6732 Fix CAgg migration with custom timezone / date format settings
* #6752 Remove custom autovacuum setting from compressed chunks
* #6770 Fix plantime chunk exclusion for OSM chunk
* #6789 Fix deletes with subqueries and compression
* #6796 Fix a crash involving a view on a hypertable
* #6797 Fix foreign key constraint handling on compressed hypertables
* #6816 Fix handling of chunks with no contraints
* #6820 Fix a crash when the ts_hypertable_insert_blocker was called directly
* #6849 Use non-orderby compressed metadata in compressed DML
* #6867 Clean up compression settings when deleting compressed cagg
* #6869 Fix compressed DML with constraints of form value OP column
* #6870 Fix bool expression pushdown for queries on compressed chunks

**Thanks**
* @brasic for reporting a crash when the ts_hypertable_insert_blocker was called directly
* @bvanelli for reporting an issue with the jobs retry count
* @djzurawsk For reporting error when dropping chunks
* #6382: Support for `time_bucket` with `origin` and `offset` in CAggs.
* #6696: Improve defaults for compression `segment_by` and `order_by`.
* #6705: Add sparse minmax indexes for compressed columns that have uncompressed btree indexes.
* #6754: Allow `DROP CONSTRAINT` on compressed hypertables.
* #6767: Add metadata table `_timestaledb_internal.bgw_job_stat_history` for tracking job execution history.
* #6798: Prevent usage of deprecated `time_bucket_ng` in CAgg definition.
* #6810: Add telemetry for access methods.
* #6811: Remove no longer relevant `timescaledb.allow_install_without_preload` GUC.
* #6837: Add migration path for CAggs using `time_bucket_ng`.
* #6865: Update the watermark when truncating a CAgg.

**Bugfixes**
* #6617: Fix error in show_chunks.
* #6621: Remove metadata when dropping chunks.
* #6677: Fix snapshot usage in CAgg invalidation scanner.
* #6698: Define meaning of 0 retries for jobs as no retries.
* #6717: Fix handling of compressed tables with primary or unique index in COPY path.
* #6726: Fix constify cagg_watermark using window function when querying a CAgg.
* #6729: Fix NULL start value handling in CAgg refresh.
* #6732: Fix CAgg migration with custom timezone / date format settings.
* #6752: Remove custom autovacuum setting from compressed chunks.
* #6770: Fix plantime chunk exclusion for OSM chunk.
* #6789: Fix deletes with subqueries and compression.
* #6796: Fix a crash involving a view on a hypertable.
* #6797: Fix foreign key constraint handling on compressed hypertables.
* #6816: Fix handling of chunks with no contraints.
* #6820: Fix a crash when the ts_hypertable_insert_blocker was called directly.
* #6849: Use non-orderby compressed metadata in compressed DML.
* #6867: Clean up compression settings when deleting compressed cagg.
* #6869: Fix compressed DML with constraints of form value OP column.
* #6870: Fix bool expression pushdown for queries on compressed chunks.

**Thanks**
* @brasic for reporting a crash when the ts_hypertable_insert_blocker was called directly.
* @bvanelli for reporting an issue with the jobs retry count.
* @djzurawsk for reporting error when dropping chunks.
* @Dzuzepppe for reporting an issue with DELETEs using subquery on compressed chunk working incorrectly.
* @hongquan For reporting a 'timestamp out of range' error during CAgg migrations
* @kevcenteno for reporting an issue with the show_chunks API showing incorrect output when 'created_before/created_after' was used with time-partitioned columns.
* @mahipv For starting working on the job history PR
* @rovo89 For reporting constify cagg_watermark not working using window function when querying a CAgg
* @hongquan for reporting a `timestamp out of range` error during CAgg migrations.
* @kevcenteno for reporting an issue with the show_chunks API showing incorrect output when `created_before/created_after` was used with time-partitioned columns.
* @mahipv for starting working on the job history PR.
* @rovo89 for reporting constify cagg_watermark not working using window function when querying a CAgg.

## 2.14.2 (2024-02-20)

Expand Down
3 changes: 2 additions & 1 deletion sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ set(MOD_FILES
updates/2.13.1--2.14.0.sql
updates/2.14.0--2.14.1.sql
updates/2.14.1--2.14.2.sql
updates/2.14.2--2.15.0.sql)
updates/2.14.2--2.15.0.sql
updates/2.15.0--2.15.1.sql)

# The downgrade file to generate a downgrade script for the current version, as
# specified in version.config
Expand Down
49 changes: 49 additions & 0 deletions sql/updates/2.15.0--2.15.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
CREATE TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function AS
SELECT
mat_hypertable_id,
bucket_func::text AS bucket_func,
bucket_width,
bucket_origin,
bucket_offset,
bucket_timezone,
bucket_fixed_width
FROM
_timescaledb_catalog.continuous_aggs_bucket_function
ORDER BY
mat_hypertable_id;

ALTER EXTENSION timescaledb
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;

DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;

CREATE TABLE _timescaledb_catalog.continuous_aggs_bucket_function (
mat_hypertable_id integer NOT NULL,
-- The bucket function
bucket_func text NOT NULL,
-- `bucket_width` argument of the function, e.g. "1 month"
bucket_width text NOT NULL,
-- optional `origin` argument of the function provided by the user
bucket_origin text,
-- optional `offset` argument of the function provided by the user
bucket_offset text,
-- optional `timezone` argument of the function provided by the user
bucket_timezone text,
-- fixed or variable sized bucket
bucket_fixed_width bool NOT NULL,
-- table constraints
CONSTRAINT continuous_aggs_bucket_function_pkey PRIMARY KEY (mat_hypertable_id),
CONSTRAINT continuous_aggs_bucket_function_mat_hypertable_id_fkey FOREIGN KEY (mat_hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE,
CONSTRAINT continuous_aggs_bucket_function_func_check CHECK (pg_catalog.to_regprocedure(bucket_func) IS DISTINCT FROM 0)
);

INSERT INTO _timescaledb_catalog.continuous_aggs_bucket_function
SELECT * FROM _timescaledb_catalog._tmp_continuous_aggs_bucket_function;

DROP TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function;

SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.continuous_aggs_bucket_function', '');

GRANT SELECT ON TABLE _timescaledb_catalog.continuous_aggs_bucket_function TO PUBLIC;

ANALYZE _timescaledb_catalog.continuous_aggs_bucket_function;
49 changes: 0 additions & 49 deletions sql/updates/latest-dev.sql
Original file line number Diff line number Diff line change
@@ -1,49 +0,0 @@
CREATE TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function AS
SELECT
mat_hypertable_id,
bucket_func::text AS bucket_func,
bucket_width,
bucket_origin,
bucket_offset,
bucket_timezone,
bucket_fixed_width
FROM
_timescaledb_catalog.continuous_aggs_bucket_function
ORDER BY
mat_hypertable_id;

ALTER EXTENSION timescaledb
DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;

DROP TABLE _timescaledb_catalog.continuous_aggs_bucket_function;

CREATE TABLE _timescaledb_catalog.continuous_aggs_bucket_function (
mat_hypertable_id integer NOT NULL,
-- The bucket function
bucket_func text NOT NULL,
-- `bucket_width` argument of the function, e.g. "1 month"
bucket_width text NOT NULL,
-- optional `origin` argument of the function provided by the user
bucket_origin text,
-- optional `offset` argument of the function provided by the user
bucket_offset text,
-- optional `timezone` argument of the function provided by the user
bucket_timezone text,
-- fixed or variable sized bucket
bucket_fixed_width bool NOT NULL,
-- table constraints
CONSTRAINT continuous_aggs_bucket_function_pkey PRIMARY KEY (mat_hypertable_id),
CONSTRAINT continuous_aggs_bucket_function_mat_hypertable_id_fkey FOREIGN KEY (mat_hypertable_id) REFERENCES _timescaledb_catalog.hypertable (id) ON DELETE CASCADE,
CONSTRAINT continuous_aggs_bucket_function_func_check CHECK (pg_catalog.to_regprocedure(bucket_func) IS DISTINCT FROM 0)
);

INSERT INTO _timescaledb_catalog.continuous_aggs_bucket_function
SELECT * FROM _timescaledb_catalog._tmp_continuous_aggs_bucket_function;

DROP TABLE _timescaledb_catalog._tmp_continuous_aggs_bucket_function;

SELECT pg_catalog.pg_extension_config_dump('_timescaledb_catalog.continuous_aggs_bucket_function', '');

GRANT SELECT ON TABLE _timescaledb_catalog.continuous_aggs_bucket_function TO PUBLIC;

ANALYZE _timescaledb_catalog.continuous_aggs_bucket_function;
2 changes: 1 addition & 1 deletion version.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = 2.16.0-dev
update_from_version = 2.15.0
update_from_version = 2.15.1
downgrade_to_version = 2.15.0

0 comments on commit e0a21a0

Please sign in to comment.