Skip to content

Commit 38956b1

Browse files
philkrasvenklemm
authored andcommitted
Release 2.20.3
1 parent 10d7078 commit 38956b1

File tree

12 files changed

+52
-42
lines changed

12 files changed

+52
-42
lines changed

.unreleased/fix_8107

Lines changed: 0 additions & 2 deletions
This file was deleted.

.unreleased/pr_8211

Lines changed: 0 additions & 1 deletion
This file was deleted.

.unreleased/pr_8216

Lines changed: 0 additions & 1 deletion
This file was deleted.

.unreleased/pr_8230

Lines changed: 0 additions & 1 deletion
This file was deleted.

.unreleased/pr_8236

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
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.20.3 (2025-06-11)
8+
9+
This release contains bug fixes since the 2.20.2 release. We recommend that you upgrade at the next available opportunity.
10+
11+
**Bugfixes**
12+
* [#8107](https://github.com/timescale/timescaledb/pull/8107) Adjust SkipScan cost for quals needing full scan of indexed data.
13+
* [#8211](https://github.com/timescale/timescaledb/pull/8211) Fixed dump and restore when chunk skipping is enabled.
14+
* [#8216](https://github.com/timescale/timescaledb/pull/8216) Fix for dropped quals bug in SkipScan.
15+
* [#8230](https://github.com/timescale/timescaledb/pull/8230) Fix for inserting into compressed data when vectorised check is not available.
16+
* [#8236](https://github.com/timescale/timescaledb/pull/8236) Fixed the snapshot handling in background workers.
17+
18+
**Thanks**
19+
* @ikaakkola for reporting that SkipScan is slow when non-index quals do not match any tuples.
20+
721
## 2.20.2 (2025-06-02)
822

923
This release contains bug fixes since the 2.20.1 release. We recommend that you upgrade at the next available opportunity.

sql/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ set(MOD_FILES
4545
updates/2.19.2--2.19.3.sql
4646
updates/2.19.3--2.20.0.sql
4747
updates/2.20.0--2.20.1.sql
48-
updates/2.20.1--2.20.2.sql)
48+
updates/2.20.1--2.20.2.sql
49+
updates/2.20.2--2.20.3.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 2.20.2--2.20.1.sql)
53+
set(CURRENT_REV_FILE 2.20.3--2.20.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.19.3--2.19.2.sql
9192
2.20.0--2.19.3.sql
9293
2.20.1--2.20.0.sql
93-
2.20.2--2.20.1.sql)
94+
2.20.2--2.20.1.sql
95+
2.20.3--2.20.2.sql)
9496

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

sql/updates/2.20.2--2.20.3.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- Make chunk_id use NULL to mark special entries instead of 0
2+
-- (Invalid chunk) since that doesn't work with the FK constraint on
3+
-- chunk_id.
4+
ALTER TABLE _timescaledb_catalog.chunk_column_stats ALTER COLUMN chunk_id DROP NOT NULL;
5+
UPDATE _timescaledb_catalog.chunk_column_stats SET chunk_id = NULL WHERE chunk_id = 0;

sql/updates/2.20.3--2.20.2.sql

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
-- Add back the chunk_column_stats NOT NULL constraint. But first
2+
-- delete all entries with with NULL since they will no longer be
3+
-- allowed. Note that reverting chunk_id back to 0 because it will
4+
-- violate the FK constraint. Even if we would revert, the downgrade
5+
-- tests for "restore" would fail due to violating entries. Removing
6+
-- the entries effectively means that collecting column stats for
7+
-- those columns will be disabled. It can be enabled again after
8+
-- downgrade. We emit a warning if anything was disabled.
9+
DO $$
10+
DECLARE
11+
num_null_chunk_ids int;
12+
BEGIN
13+
14+
SELECT count(*) INTO num_null_chunk_ids
15+
FROM _timescaledb_catalog.chunk_column_stats WHERE chunk_id IS NULL;
16+
17+
IF num_null_chunk_ids > 0 THEN
18+
RAISE WARNING 'chunk skipping has been disabled for all hypertables'
19+
USING HINT = 'Use enable_chunk_skipping() to re-enable chunk skipping';
20+
END IF;
21+
END
22+
$$;
23+
24+
DELETE FROM _timescaledb_catalog.chunk_column_stats WHERE chunk_id IS NULL;
25+
ALTER TABLE _timescaledb_catalog.chunk_column_stats ALTER COLUMN chunk_id SET NOT NULL;

sql/updates/latest-dev.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
-- Make chunk_id use NULL to mark special entries instead of 0
2-
-- (Invalid chunk) since that doesn't work with the FK constraint on
3-
-- chunk_id.
4-
ALTER TABLE _timescaledb_catalog.chunk_column_stats ALTER COLUMN chunk_id DROP NOT NULL;
5-
UPDATE _timescaledb_catalog.chunk_column_stats SET chunk_id = NULL WHERE chunk_id = 0;

sql/updates/reverse-dev.sql

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +0,0 @@
1-
-- Add back the chunk_column_stats NOT NULL constraint. But first
2-
-- delete all entries with with NULL since they will no longer be
3-
-- allowed. Note that reverting chunk_id back to 0 because it will
4-
-- violate the FK constraint. Even if we would revert, the downgrade
5-
-- tests for "restore" would fail due to violating entries. Removing
6-
-- the entries effectively means that collecting column stats for
7-
-- those columns will be disabled. It can be enabled again after
8-
-- downgrade. We emit a warning if anything was disabled.
9-
DO $$
10-
DECLARE
11-
num_null_chunk_ids int;
12-
BEGIN
13-
14-
SELECT count(*) INTO num_null_chunk_ids
15-
FROM _timescaledb_catalog.chunk_column_stats WHERE chunk_id IS NULL;
16-
17-
IF num_null_chunk_ids > 0 THEN
18-
RAISE WARNING 'chunk skipping has been disabled for all hypertables'
19-
USING HINT = 'Use enable_chunk_skipping() to re-enable chunk skipping';
20-
END IF;
21-
END
22-
$$;
23-
24-
DELETE FROM _timescaledb_catalog.chunk_column_stats WHERE chunk_id IS NULL;
25-
ALTER TABLE _timescaledb_catalog.chunk_column_stats ALTER COLUMN chunk_id SET NOT NULL;

version.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = 2.20.2
2-
previous_version = 2.20.1
3-
downgrade_to_version = 2.20.1
1+
version = 2.20.3
2+
previous_version = 2.20.2
3+
downgrade_to_version = 2.20.2

0 commit comments

Comments
 (0)