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 OR BoolExpr from pushdown #6917

Merged
merged 1 commit into from
May 19, 2024
Merged

Conversation

svenklemm
Copy link
Member

RestrictInfo with OR need special handling which we currently do not do which can lead to segfaults in planner if unhandled.

Fixes #6912

@svenklemm svenklemm self-assigned this May 14, 2024
@svenklemm svenklemm added the segfault Segmentation fault label May 14, 2024
@akuzm
Copy link
Member

akuzm commented May 15, 2024

What exactly is broken? I reproduced it but I have no idea what's going on... Theoretically, the make_restrictinfo should take care of creating the proper orclause as well.

@svenklemm
Copy link
Member Author

What exactly is broken? I reproduced it but I have no idea what's going on... Theoretically, the make_restrictinfo should take care of creating the proper orclause as well.

Not yet sure what is going wrong there but the or branches are not wrapped in restrictinfos

Copy link
Contributor

@fabriziomello fabriziomello left a comment

Choose a reason for hiding this comment

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

It fixes the segfault but won't it create some perf regression?

@svenklemm
Copy link
Member Author

It fixes the segfault but won't it create some perf regression?

Potentially yes. Ideally we can reenable this in followup PR after we fix OR processing.

@akuzm
Copy link
Member

akuzm commented May 18, 2024

Potentially yes. Ideally we can reenable this in followup PR after we fix OR processing.

Let's go with the thing we discussed on Slack -- avoiding nested AND boolexprs by applying eval_const_expressions after modify_expression in pushdown_quals. I checked that it fixes this case.

@svenklemm svenklemm force-pushed the boolexpr_or branch 2 times, most recently from 90ae4a8 to 8b3449f Compare May 19, 2024 04:45
@svenklemm svenklemm enabled auto-merge (rebase) May 19, 2024 04:45
@svenklemm svenklemm force-pushed the boolexpr_or branch 2 times, most recently from 099d094 to 5b9ffa0 Compare May 19, 2024 14:37
RestrictInfo with OR need special handling which we currently do
not do which can lead to segfaults in planner if unhandled.
Copy link

codecov bot commented May 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.83%. Comparing base (59f50f2) to head (5b9ffa0).
Report is 164 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6917      +/-   ##
==========================================
+ Coverage   80.06%   80.83%   +0.77%     
==========================================
  Files         190      199       +9     
  Lines       37181    37195      +14     
  Branches     9450     9704     +254     
==========================================
+ Hits        29770    30068     +298     
- Misses       2997     3246     +249     
+ Partials     4414     3881     -533     

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

@svenklemm svenklemm merged commit 01924c7 into timescale:main May 19, 2024
34 of 35 checks passed
@svenklemm svenklemm added this to the TimescaleDB 2.15.1 milestone May 24, 2024
@fabriziomello fabriziomello added the force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-2.15.x force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" planner segfault Segmentation fault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coredump in LATERAL query
6 participants