Skip to content

Conversation

natalya-aksman
Copy link
Member

@natalya-aksman natalya-aksman commented Jul 2, 2025

Fixes #8241

There were two issues with generic plans:

  1. We didn't expand hypertables for FK checks for generic plans because we checked for params being passed in, but they were only passed in for custom plans, for generic plans NULL is passed. So FK prep work wasn't done for FK checks with generic plans. Now we also check for external params in the query.

  2. Update/Delete on compressed chunks can create partial chunk instead of purely compressed one. This should invalidate any plans relying on this chunk as its status has changed. It is now invalidated similar to

    ts_chunk_set_partial(chunk);
    .

Copy link

github-actions bot commented Jul 2, 2025

@mkindahl, @gayyappan: please review this pull request.

Powered by pull-review

@natalya-aksman natalya-aksman requested review from akuzm and svenklemm and removed request for gayyappan July 2, 2025 16:28
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.10%. Comparing base (7414e37) to head (e89ca9a).
⚠️ Report is 151 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8336      +/-   ##
==========================================
- Coverage   82.28%   82.10%   -0.18%     
==========================================
  Files         262      262              
  Lines       49074    49047      -27     
  Branches    12362    12358       -4     
==========================================
- Hits        40379    40270     -109     
- Misses       3753     3911     +158     
+ Partials     4942     4866      -76     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@natalya-aksman natalya-aksman force-pushed the fix_cached_plans_for_prep_statements_i8241 branch from 14e7d79 to e1216d8 Compare July 2, 2025 17:30
@natalya-aksman natalya-aksman force-pushed the fix_cached_plans_for_prep_statements_i8241 branch 2 times, most recently from 2ebd18d to fe3ae10 Compare July 2, 2025 18:51
@natalya-aksman natalya-aksman force-pushed the fix_cached_plans_for_prep_statements_i8241 branch from fe3ae10 to be0b34f Compare July 8, 2025 13:21
@natalya-aksman natalya-aksman force-pushed the fix_cached_plans_for_prep_statements_i8241 branch from be0b34f to e89ca9a Compare July 8, 2025 13:48
@natalya-aksman natalya-aksman merged commit 8509165 into timescale:main Jul 8, 2025
41 checks passed
timescale-automation pushed a commit that referenced this pull request Jul 8, 2025
timescale-automation pushed a commit that referenced this pull request Jul 8, 2025
@philkra philkra mentioned this pull request Jul 22, 2025
philkra added a commit that referenced this pull request Jul 22, 2025
## 2.21.1 (2025-07-22)

This release contains a bug fix since the 2.21.0 release. We recommend
that you upgrade at the next available opportunity.

**Bugfixes**
* [#8336](#8336) Fix
generic plans for foreign key checks and prepared statements

**Thanks**
* @CodeTherapist for reporting the issue with foreign key checks not
working after several `INSERT` statements

---------

Co-authored-by: philkra <[email protected]>
Co-authored-by: philkra <[email protected]>
@philkra philkra mentioned this pull request Jul 22, 2025
philkra added a commit that referenced this pull request Jul 22, 2025
## 2.21.1 (2025-07-22)

This release contains a bug fix since the 2.21.0 release. We recommend
that you upgrade at the next available opportunity.

**Bugfixes**
* [#8336](#8336) Fix
generic plans for foreign key checks and prepared statements

**Thanks**
* @CodeTherapist for reporting the issue with foreign key checks not
working after several `INSERT` statements

Co-authored-by: Eon <[email protected]>
@timescale-automation timescale-automation added the released-2.21.1 Released in 2.21.1 label Jul 22, 2025
@svenklemm svenklemm mentioned this pull request Aug 26, 2025
@timescale-automation timescale-automation added the released-2.22.0 Released in 2.22.0 label Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Many to many relationship with date composite key insert into hypertable does not work

5 participants