Skip to content

Conversation

@timescale-automation
Copy link
Member

This is an automated backport of #8336: Fix generic plans for FK checks and prepared statements.
The original issue is #8241.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.

For more details, please see the documentation

Original description

Fix generic plans for FK checks and prepared statements

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);
    .

@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.05%. Comparing base (c28096b) to head (2f94e73).

Additional details and impacted files
@@            Coverage Diff             @@
##           2.21.x    #8363      +/-   ##
==========================================
- Coverage   82.26%   82.05%   -0.22%     
==========================================
  Files         257      257              
  Lines       48858    48831      -27     
  Branches    12318    12314       -4     
==========================================
- Hits        40195    40066     -129     
- Misses       3741     3913     +172     
+ Partials     4922     4852      -70     

☔ 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.

@timescale-automation timescale-automation merged commit 807c59e into 2.21.x Jul 8, 2025
39 checks passed
@timescale-automation timescale-automation deleted the backport/2.21.x/8336 branch July 8, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is-auto-backport PR created by backport automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants