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

Block merging of frozen chunks #7665

Merged

Conversation

erimatnor
Copy link
Contributor

It should not be possible to merge a frozen chunk since it is used to tier chunks. If the chunk is merged, it might no longer exist when the tiering happens.

@erimatnor erimatnor requested a review from zilder February 7, 2025 10:01
@erimatnor erimatnor marked this pull request as ready for review February 7, 2025 10:01
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.35%. Comparing base (59f50f2) to head (dccd04c).
Report is 742 commits behind head on main.

Files with missing lines Patch % Lines
tsl/src/chunk.c 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7665      +/-   ##
==========================================
+ Coverage   80.06%   81.35%   +1.28%     
==========================================
  Files         190      242      +52     
  Lines       37181    44890    +7709     
  Branches     9450    11204    +1754     
==========================================
+ Hits        29770    36519    +6749     
- Misses       2997     3976     +979     
+ Partials     4414     4395      -19     

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

tsl/src/chunk.c Outdated Show resolved Hide resolved
Copy link
Contributor

@gayyappan gayyappan left a comment

Choose a reason for hiding this comment

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

Suggest updating the error message.
Changes look good to me.

tsl/src/chunk.c Outdated Show resolved Hide resolved
@erimatnor erimatnor force-pushed the merge-chunks-block-frozen-chunks branch 2 times, most recently from 955cc74 to 42de2d4 Compare February 10, 2025 08:37
It should not be possible to merge a frozen chunk since it is used to
tier chunks. If the chunk is merged, it might no longer exist when the
tiering happens.
@erimatnor erimatnor force-pushed the merge-chunks-block-frozen-chunks branch from 42de2d4 to dccd04c Compare February 10, 2025 08:53
@erimatnor erimatnor enabled auto-merge (rebase) February 10, 2025 08:54
@erimatnor erimatnor merged commit 121cd82 into timescale:main Feb 10, 2025
49 of 50 checks passed
@erimatnor erimatnor added force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" backported-2.18.x labels Feb 10, 2025
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* timescale#7656 Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* timescale#6884 Match the Postgres NaN comparison behavior in WHERE clause over compressed tables.
* timescale#7600 Fix lock order when dropping index
* timescale#7637 Allow EXPLAIN in read-only mode
* timescale#7645 Fix DELETE on compressed chunk with non-btree operators
* timescale#7649 Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* timescale#7653 Push down orderby scankeys to Hypercore TAM
* timescale#7665 Block merging of frozen chunks
* timescale#7673 Don't abort additional INSERTs when hitting first conflict

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* @jakehedlund for reporting the incompatible NaN behavior in WHERE clause over compressed tables.
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
@svenklemm svenklemm mentioned this pull request Feb 10, 2025
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* timescale#7656 Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* timescale#6884 Match the Postgres NaN comparison behavior in WHERE clause over compressed tables.
* timescale#7600 Fix lock order when dropping index
* timescale#7637 Allow EXPLAIN in read-only mode
* timescale#7645 Fix DELETE on compressed chunk with non-btree operators
* timescale#7649 Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* timescale#7653 Push down orderby scankeys to Hypercore TAM
* timescale#7665 Block merging of frozen chunks
* timescale#7673 Don't abort additional INSERTs when hitting first conflict

**GUCs**
* enable_hypercore_scankey_pushdown: Push down qualifiers as scankeys when using Hypercore TAM

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* @jakehedlund for reporting the incompatible NaN behavior in WHERE clause over compressed tables.
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* timescale#7656 Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* timescale#7600 Fix lock order when dropping index
* timescale#7637 Allow EXPLAIN in read-only mode
* timescale#7645 Fix DELETE on compressed chunk with non-btree operators
* timescale#7649 Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* timescale#7653 Push down orderby scankeys to Hypercore TAM
* timescale#7665 Block merging of frozen chunks
* timescale#7673 Don't abort additional INSERTs when hitting first conflict

**GUCs**
* enable_hypercore_scankey_pushdown: Push down qualifiers as scankeys when using Hypercore TAM

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
svenklemm added a commit that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* #7656 Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* #7600 Fix lock order when dropping index
* #7637 Allow EXPLAIN in read-only mode
* #7645 Fix DELETE on compressed chunk with non-btree operators
* #7649 Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* #7653 Push down orderby scankeys to Hypercore TAM
* #7665 Block merging of frozen chunks
* #7673 Don't abort additional INSERTs when hitting first conflict

**GUCs**
* enable_hypercore_scankey_pushdown: Push down qualifiers as scankeys when using Hypercore TAM

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* [timescale#7656](timescale#7656) Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* [timescale#7600](timescale#7600) Fix lock order when dropping index
* [timescale#7637](timescale#7637) Allow EXPLAIN in read-only mode
* [timescale#7645](timescale#7645) Fix DELETE on compressed chunk with non-btree operators
* [timescale#7649](timescale#7649) Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* [timescale#7653](timescale#7653) Push down orderby scankeys to Hypercore TAM
* [timescale#7665](timescale#7665) Block merging of frozen chunks
* [timescale#7673](timescale#7673) Don't abort additional INSERTs when hitting first conflict

**GUCs**
* `enable_hypercore_scankey_pushdown`: Push down qualifiers as scankeys when using Hypercore TAM introduced with [timescale#7653](timescale#7653)

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
@svenklemm svenklemm mentioned this pull request Feb 10, 2025
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* [timescale#7656](timescale#7656) Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* [timescale#7600](timescale#7600) Fix lock order when dropping index
* [timescale#7637](timescale#7637) Allow EXPLAIN in read-only mode
* [timescale#7645](timescale#7645) Fix DELETE on compressed chunk with non-btree operators
* [timescale#7649](timescale#7649) Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* [timescale#7653](timescale#7653) Push down orderby scankeys to Hypercore TAM
* [timescale#7665](timescale#7665) Block merging of frozen chunks
* [timescale#7673](timescale#7673) Don't abort additional INSERTs when hitting first conflict

**GUCs**
* `enable_hypercore_scankey_pushdown`: Push down qualifiers as scankeys when using Hypercore TAM introduced with [timescale#7653](timescale#7653)

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* [timescale#7656](timescale#7656) Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* [timescale#7600](timescale#7600) Fix lock order when dropping index
* [timescale#7637](timescale#7637) Allow EXPLAIN in read-only mode
* [timescale#7645](timescale#7645) Fix DELETE on compressed chunk with non-btree operators
* [timescale#7649](timescale#7649) Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* [timescale#7653](timescale#7653) Push down orderby scankeys to Hypercore TAM
* [timescale#7665](timescale#7665) Block merging of frozen chunks
* [timescale#7673](timescale#7673) Don't abort additional INSERTs when hitting first conflict

**GUCs**
* `enable_hypercore_scankey_pushdown`: Push down qualifiers as scankeys when using Hypercore TAM introduced with [timescale#7653](timescale#7653)

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Feb 10, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* [timescale#7656](timescale#7656) Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* [timescale#7600](timescale#7600) Fix lock order when dropping index
* [timescale#7637](timescale#7637) Allow EXPLAIN in read-only mode
* [timescale#7645](timescale#7645) Fix DELETE on compressed chunk with non-btree operators
* [timescale#7649](timescale#7649) Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* [timescale#7653](timescale#7653) Push down orderby scankeys to Hypercore TAM
* [timescale#7665](timescale#7665) Block merging of frozen chunks
* [timescale#7673](timescale#7673) Don't abort additional INSERTs when hitting first conflict

**GUCs**
* `enable_hypercore_scankey_pushdown`: Push down qualifiers as scankeys when using Hypercore TAM introduced with [timescale#7653](timescale#7653)

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
svenklemm added a commit that referenced this pull request Feb 11, 2025
This release contains performance improvements and bug fixes since
the 2.18.0 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* [#7656](#7656) Remove limitation of compression policy for continuous aggregates

**Bugfixes**
* [#7600](#7600) Fix lock order when dropping index
* [#7637](#7637) Allow EXPLAIN in read-only mode
* [#7645](#7645) Fix DELETE on compressed chunk with non-btree operators
* [#7649](#7649) Allow non-btree operator pushdown in UPDATE/DELETE queries on compressed chunks
* [#7653](#7653) Push down orderby scankeys to Hypercore TAM
* [#7665](#7665) Block merging of frozen chunks
* [#7673](#7673) Don't abort additional INSERTs when hitting first conflict

**GUCs**
* `enable_hypercore_scankey_pushdown`: Push down qualifiers as scankeys when using Hypercore TAM introduced with [#7653](#7653)

**Thanks**
* @bjornuppeke for reporting a problem with INSERT INTO ... ON CONFLICT DO NOTHING on compressed chunks
* @ikalafat for reporting a problem with EXPLAIN in read-only mode
* Timescale community members Jacob and pantonis for reporting issues with slow queries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-2.18.x force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" split/merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants