Skip to content

Commit

Permalink
Release notes header 2.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomello committed May 2, 2024
1 parent fc46eab commit 5457ae1
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 5 deletions.
100 changes: 100 additions & 0 deletions .unreleased/RELEASE_NOTES_HEADER.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
## {{ 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
available opportunity.

In addition, it includes these noteworthy features:
* Support `time_bucket` with `origin` and/or `offset` on Continuous Aggregate
* Compression improvements:
- Improve expression pushdown
- Add minmax sparse indexes when compressing columns with btree indexes
- Make compression use the defaults functions
* Vectorize filters in WHERE clause that contain text equality operators and LIKE expressions

**Deprecation warning**
* Starting on this release will not be possible to create Continuous Aggregate using `time_bucket_ng` anymore and it will be completely removed on the upcoming releases.
* 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.
* PG13 deprecation??

**For on-premise users and this release only**, you will need to run the following SQL script after running `ALTER EXTENSION`. More details can be found in the pull request [#6786](https://github.com/timescale/timescaledb/pull/6797).

```sql
CREATE OR REPLACE FUNCTION pg_temp.constraint_columns(regclass, int2[]) RETURNS text[] AS
$$
SELECT array_agg(attname) FROM unnest($2) un(attnum) LEFT JOIN pg_attribute att ON att.attrelid=$1 AND att.attnum = un.attnum;
$$ LANGUAGE SQL SET search_path TO pg_catalog, pg_temp;

DO $$
DECLARE
ht_id int;
ht regclass;
chunk regclass;
con_oid oid;
con_frelid regclass;
con_name text;
con_columns text[];
chunk_id int;

BEGIN

-- iterate over all hypertables that have foreign key constraints
FOR ht_id, ht in
SELECT
ht.id,
format('%I.%I',ht.schema_name,ht.table_name)::regclass
FROM _timescaledb_catalog.hypertable ht
WHERE
EXISTS (
SELECT FROM pg_constraint con
WHERE
con.contype='f' AND
con.conrelid=format('%I.%I',ht.schema_name,ht.table_name)::regclass
)
LOOP
RAISE NOTICE 'Hypertable % has foreign key constraint', ht;

-- iterate over all foreign key constraints on the hypertable
-- and check that they are present on every chunk
FOR con_oid, con_frelid, con_name, con_columns IN
SELECT con.oid, con.confrelid, con.conname, pg_temp.constraint_columns(con.conrelid,con.conkey)
FROM pg_constraint con
WHERE
con.contype='f' AND
con.conrelid=ht
LOOP
RAISE NOTICE 'Checking constraint % %', con_name, con_columns;
-- check that the foreign key constraint is present on the chunk

FOR chunk_id, chunk IN
SELECT
ch.id,
format('%I.%I',ch.schema_name,ch.table_name)::regclass
FROM _timescaledb_catalog.chunk ch
WHERE
ch.hypertable_id=ht_id
LOOP
RAISE NOTICE 'Checking chunk %', chunk;
IF NOT EXISTS (
SELECT FROM pg_constraint con
WHERE
con.contype='f' AND
con.conrelid=chunk AND
con.confrelid=con_frelid AND
pg_temp.constraint_columns(con.conrelid,con.conkey) = con_columns
) THEN
RAISE WARNING 'Restoring constraint % on chunk %', con_name, chunk;
PERFORM _timescaledb_functions.constraint_clone(con_oid, chunk);
INSERT INTO _timescaledb_catalog.chunk_constraint(chunk_id, dimension_slice_id, constraint_name, hypertable_constraint_name) VALUES (chunk_id, NULL, con_name, con_name);
END IF;

END LOOP;
END LOOP;

END LOOP;

END
$$;

DROP FUNCTION pg_temp.constraint_columns(regclass, int2[]);
```
2 changes: 1 addition & 1 deletion .unreleased/pr_6621
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Fixes: #6621 Remove metadata when dropping chunks
Thanks: @ndjzurawsk For reporting error when dropping chunks
Thanks: @djzurawsk For reporting error when dropping chunks
File renamed without changes.
8 changes: 4 additions & 4 deletions scripts/merge_changelogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# This script build a CHANGELOG.md entry for a new release
#

RELEASE_NOTES_TEMPLATE='.unreleased/RELEASE_NOTES.md.j2'
RELEASE_NOTES_HEADER_TEMPLATE='.unreleased/RELEASE_NOTES_HEADER.md.j2'

echo_changelog() {
echo "${1}"
# skip the template and release notes files
grep -i "${2}" .unreleased/* | \
grep -v '.unreleased/template.*' | \
grep -v "${RELEASE_NOTES_TEMPLATE}" | \
grep -v "${RELEASE_NOTES_HEADER_TEMPLATE}" | \
cut -d: -f3- | sort | uniq | sed -e 's/^[[:space:]]*//' -e 's/^/* /'
echo
}
Expand All @@ -28,12 +28,12 @@ RELEASE_DATE=$(date +"%Y-%m-%d")
# To install jinja template client:
# $ pip install jinja-cli
#
if [ -f "${RELEASE_NOTES_TEMPLATE}" ];
if [ -f "${RELEASE_NOTES_HEADER_TEMPLATE}" ];
then
jinja \
-D release_current "${RELEASE_CURRENT}" \
-D release_previous "${RELEASE_PREVIOUS}" \
-D release_date "${RELEASE_DATE}" ${RELEASE_NOTES_TEMPLATE}
-D release_date "${RELEASE_DATE}" ${RELEASE_NOTES_HEADER_TEMPLATE}
echo
fi

Expand Down

0 comments on commit 5457ae1

Please sign in to comment.