-
Notifications
You must be signed in to change notification settings - Fork 973
Fix generic plans for FK checks and prepared statements #8336
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
Merged
natalya-aksman
merged 1 commit into
timescale:main
from
natalya-aksman:fix_cached_plans_for_prep_statements_i8241
Jul 8, 2025
Merged
Fix generic plans for FK checks and prepared statements #8336
natalya-aksman
merged 1 commit into
timescale:main
from
natalya-aksman:fix_cached_plans_for_prep_statements_i8241
Jul 8, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mkindahl, @gayyappan: please review this pull request.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
akuzm
reviewed
Jul 2, 2025
14e7d79
to
e1216d8
Compare
akuzm
reviewed
Jul 2, 2025
akuzm
reviewed
Jul 2, 2025
akuzm
approved these changes
Jul 2, 2025
2ebd18d
to
fe3ae10
Compare
mkindahl
approved these changes
Jul 3, 2025
fe3ae10
to
be0b34f
Compare
be0b34f
to
e89ca9a
Compare
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
Merged
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]>
Merged
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]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backported-2.21.x
hypertable
planner
released-2.21.1
Released in 2.21.1
released-2.22.0
Released in 2.22.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #8241
There were two issues with generic plans:
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.
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
timescaledb/src/nodes/chunk_dispatch/chunk_insert_state.c
Line 592 in 71ccb71