Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metadata when dropping chunk #6621

Conversation

fabriziomello
Copy link
Contributor

@fabriziomello fabriziomello commented Feb 8, 2024

Historically we preserve chunk metadata because the old format of the
Continuous Aggregate has the chunk_id column in the materialization
hypertable so in order to don't have chunk ids left over there we just
mark it as dropped when dropping chunks.

In #4269 we introduced a new Continuous Aggregate format that don't
store the chunk_id in the materialization hypertable anymore so it's
safe to also remove the metadata when dropping chunk and all associated
Continuous Aggregates are in the new format.

Also added a post-update SQL script to cleanup unnecessary dropped chunk
metadata in our catalog.

Closes #6570

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (59f50f2) 80.06% compared to head (95eb512) 81.46%.
Report is 6 commits behind head on main.

❗ Current head 95eb512 differs from pull request most recent head 30920b4. Consider uploading reports for the commit 30920b4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6621      +/-   ##
==========================================
+ Coverage   80.06%   81.46%   +1.39%     
==========================================
  Files         190      190              
  Lines       37181    36319     -862     
  Branches     9450     9436      -14     
==========================================
- Hits        29770    29587     -183     
+ Misses       2997     2985      -12     
+ Partials     4414     3747     -667     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch 6 times, most recently from 5d47958 to 1b59fe7 Compare February 8, 2024 20:27
@fabriziomello fabriziomello added hypertable tech-debt Needs refactoring and improvement tasks related to the source code and its architecture. disable-auto-backport Do not automatically backport this PR or fix of this issue bug and removed bug disable-auto-backport Do not automatically backport this PR or fix of this issue labels Feb 8, 2024
@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch 2 times, most recently from af1c828 to cfaadbe Compare February 9, 2024 13:44
@fabriziomello fabriziomello marked this pull request as ready for review February 9, 2024 14:33
Copy link

github-actions bot commented Feb 9, 2024

@antekresic, @akuzm: please review this pull request.

Powered by pull-review

Copy link
Member

@svenklemm svenklemm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think you should add this to post-update but use latest-dev instead to fix because otherwise it will constrain changes that can be done in the update script in the future

@fabriziomello
Copy link
Contributor Author

I dont think you should add this to post-update but use latest-dev instead to fix because otherwise it will constrain changes that can be done in the update script in the future

Good that you mentioned it. I had the same feeling but ended up placing this here in order to make sure the future releases we'll don't have chunk metadata leftovers, but I can move it to the latest-dev and in the future when we complete remove the dropped column then write again this cleanup script to make sure we'll not end up with metadata leftovers.

@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch 2 times, most recently from 44d1389 to 85c2e12 Compare February 9, 2024 21:46
@fabriziomello
Copy link
Contributor Author

@svenklemm moved the post-update.sql cleanup to latest-dev.sql

@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch 5 times, most recently from ca17b62 to c11d0a3 Compare February 14, 2024 21:24
@jnidzwetzki
Copy link
Contributor

@fabriziomello Nit: there is a typo in the commit message unecessary -> unnecessary

@@ -17,3 +17,52 @@ DROP FUNCTION IF EXISTS _timescaledb_functions.invalidation_process_hypertable_l
DROP FUNCTION IF EXISTS _timescaledb_functions.invalidation_process_hypertable_log(integer,integer,regtype,integer[],bigint[],bigint[],text[]);
DROP FUNCTION IF EXISTS _timescaledb_functions.hypertable_invalidation_log_delete(integer);

-- Cleanup metadata for deleted chunks
CREATE UNLOGGED TABLE _timescaledb_catalog._chunks_remove AS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Consider prefixing the table with _tmp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turned it into a PL/pgSQL function!

@jnidzwetzki
Copy link
Contributor

@fabriziomello As discussed, I also did some experiments with compressed hypertables and CAggs. The clean-up works correctly as well.

I am wondering if this cleanup SQL should also be added to the cagg_migration steps and run every time you convert a CAgg into the finalized form.

@fabriziomello
Copy link
Contributor Author

@fabriziomello As discussed, I also did some experiments with compressed hypertables and CAggs. The clean-up works correctly as well.

I am wondering if this cleanup SQL should also be added to the cagg_migration steps and run every time you convert a CAgg into the finalized form.

Very good catch @jnidzwetzki thanks. Will add the cleanup to the migration scripts.

@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch 3 times, most recently from 5d9ce57 to 28ade46 Compare February 15, 2024 19:09
@fabriziomello
Copy link
Contributor Author

@fabriziomello As discussed, I also did some experiments with compressed hypertables and CAggs. The clean-up works correctly as well.
I am wondering if this cleanup SQL should also be added to the cagg_migration steps and run every time you convert a CAgg into the finalized form.

Very good catch @jnidzwetzki thanks. Will add the cleanup to the migration scripts.

Added it also to the cagg_migrate procedure and also added proper regression tests

@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch from 28ade46 to 95eb512 Compare February 15, 2024 21:14
Historically we preserve chunk metadata because the old format of the
Continuous Aggregate has the `chunk_id` column in the materialization
hypertable so in order to don't have chunk ids left over there we just
mark it as dropped when dropping chunks.

In timescale#4269 we introduced a new Continuous Aggregate format that don't
store the `chunk_id` in the materialization hypertable anymore so it's
safe to also remove the metadata when dropping chunk and all associated
Continuous Aggregates are in the new format.

Also added a post-update SQL script to cleanup unnecessary dropped chunk
metadata in our catalog.

Closes timescale#6570
@fabriziomello fabriziomello force-pushed the remove_chunk_metadata_when_dropping_chunk branch from 95eb512 to 30920b4 Compare February 16, 2024 12:20
@fabriziomello fabriziomello dismissed svenklemm’s stale review February 16, 2024 13:28

Addressed Sven's concerns

@fabriziomello fabriziomello merged commit 5a359ac into timescale:main Feb 16, 2024
41 checks passed
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request May 6, 2024
This release contains performance improvements and bug fixes since
the 2.14.2 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.
* 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 [timescale#6786](timescale#6797).

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

**Bugfixes**
* timescale#6617 Fix error in show_chunks
* timescale#6621 Remove metadata when dropping chunks
* timescale#6677 Fix snapshot usage in CAgg invalidation scanner
* timescale#6698 Define meaning of 0 retries for jobs as no retries
* timescale#6717 Fix handling of compressed tables with primary or unique index in COPY path
* timescale#6726 Fix constify cagg_watermark using window function when querying a CAgg
* timescale#6729 Fix NULL start value handling in CAgg refresh
* timescale#6732 Fix CAgg migration with custom timezone / date format settings
* timescale#6752 Remove custom autovacuum setting from compressed chunks
* timescale#6770 Fix plantime chunk exclusion for OSM chunk
* timescale#6789 Fix deletes with subqueries and compression
* timescale#6796 Fix a crash involving a view on a hypertable
* timescale#6797 Fix foreign key constraint handling on compressed hypertables
* timescale#6816 Fix handling of chunks with no contraints
* timescale#6820 Fix a crash when the ts_hypertable_insert_blocker was called directly
* timescale#6849 Use non-orderby compressed metadata in compressed DML
* timescale#6867 Clean up compression settings when deleting compressed cagg
* timescale#6869 Fix compressed DML with constraints of form value OP column
* timescale#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
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request May 6, 2024
This release contains performance improvements and bug fixes since
the 2.14.2 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.
* 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 [timescale#6786](timescale#6797).

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

**Bugfixes**
* timescale#6617 Fix error in show_chunks
* timescale#6621 Remove metadata when dropping chunks
* timescale#6677 Fix snapshot usage in CAgg invalidation scanner
* timescale#6698 Define meaning of 0 retries for jobs as no retries
* timescale#6717 Fix handling of compressed tables with primary or unique index in COPY path
* timescale#6726 Fix constify cagg_watermark using window function when querying a CAgg
* timescale#6729 Fix NULL start value handling in CAgg refresh
* timescale#6732 Fix CAgg migration with custom timezone / date format settings
* timescale#6752 Remove custom autovacuum setting from compressed chunks
* timescale#6770 Fix plantime chunk exclusion for OSM chunk
* timescale#6789 Fix deletes with subqueries and compression
* timescale#6796 Fix a crash involving a view on a hypertable
* timescale#6797 Fix foreign key constraint handling on compressed hypertables
* timescale#6816 Fix handling of chunks with no contraints
* timescale#6820 Fix a crash when the ts_hypertable_insert_blocker was called directly
* timescale#6849 Use non-orderby compressed metadata in compressed DML
* timescale#6867 Clean up compression settings when deleting compressed cagg
* timescale#6869 Fix compressed DML with constraints of form value OP column
* timescale#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
@fabriziomello fabriziomello mentioned this pull request May 6, 2024
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request May 6, 2024
This release contains performance improvements and bug fixes since
the 2.14.2 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.
* 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 [timescale#6786](timescale#6797).

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

**Bugfixes**
* timescale#6617 Fix error in show_chunks
* timescale#6621 Remove metadata when dropping chunks
* timescale#6677 Fix snapshot usage in CAgg invalidation scanner
* timescale#6698 Define meaning of 0 retries for jobs as no retries
* timescale#6717 Fix handling of compressed tables with primary or unique index in COPY path
* timescale#6726 Fix constify cagg_watermark using window function when querying a CAgg
* timescale#6729 Fix NULL start value handling in CAgg refresh
* timescale#6732 Fix CAgg migration with custom timezone / date format settings
* timescale#6752 Remove custom autovacuum setting from compressed chunks
* timescale#6770 Fix plantime chunk exclusion for OSM chunk
* timescale#6789 Fix deletes with subqueries and compression
* timescale#6796 Fix a crash involving a view on a hypertable
* timescale#6797 Fix foreign key constraint handling on compressed hypertables
* timescale#6816 Fix handling of chunks with no contraints
* timescale#6820 Fix a crash when the ts_hypertable_insert_blocker was called directly
* timescale#6849 Use non-orderby compressed metadata in compressed DML
* timescale#6867 Clean up compression settings when deleting compressed cagg
* timescale#6869 Fix compressed DML with constraints of form value OP column
* timescale#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
fabriziomello added a commit that referenced this pull request May 6, 2024
This release contains performance improvements and bug fixes since
the 2.14.2 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.
* 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](#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
* @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
fabriziomello added a commit to fabriziomello/timescaledb that referenced this pull request May 6, 2024
This release contains performance improvements and bug fixes since
the 2.14.2 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.
* 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 [timescale#6786](timescale#6797).

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

**Bugfixes**
* timescale#6617 Fix error in show_chunks
* timescale#6621 Remove metadata when dropping chunks
* timescale#6677 Fix snapshot usage in CAgg invalidation scanner
* timescale#6698 Define meaning of 0 retries for jobs as no retries
* timescale#6717 Fix handling of compressed tables with primary or unique index in COPY path
* timescale#6726 Fix constify cagg_watermark using window function when querying a CAgg
* timescale#6729 Fix NULL start value handling in CAgg refresh
* timescale#6732 Fix CAgg migration with custom timezone / date format settings
* timescale#6752 Remove custom autovacuum setting from compressed chunks
* timescale#6770 Fix plantime chunk exclusion for OSM chunk
* timescale#6789 Fix deletes with subqueries and compression
* timescale#6796 Fix a crash involving a view on a hypertable
* timescale#6797 Fix foreign key constraint handling on compressed hypertables
* timescale#6816 Fix handling of chunks with no contraints
* timescale#6820 Fix a crash when the ts_hypertable_insert_blocker was called directly
* timescale#6849 Use non-orderby compressed metadata in compressed DML
* timescale#6867 Clean up compression settings when deleting compressed cagg
* timescale#6869 Fix compressed DML with constraints of form value OP column
* timescale#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
fabriziomello added a commit that referenced this pull request May 7, 2024
This release contains performance improvements and bug fixes since
the 2.14.2 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.
* 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](#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
* @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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hypertable tech-debt Needs refactoring and improvement tasks related to the source code and its architecture.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 'ERROR: tuple already updated by self' after dropping chunks then inserting data
4 participants