Don't loop over all tables in per-table expansion hook#10090
Open
akuzm wants to merge 5 commits into
Open
Conversation
This looks like leftover of the old approach where we expanded all hypertables at the beginning of the query. The current code expands all hypertables when the "set pathlist" hook is called for the first hypertable. This doesn't seem to lead to any problems, but this control flow looks unexpected. Just let the Postgres enumerate all tables in query normally, and in the hook, expand only the hypertable it is called for.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
akuzm
commented
Jun 22, 2026
| -> Merge Join (actual rows=3.00 loops=1) | ||
| Merge Cond: (m2."time" = m1."time") | ||
| Join Filter: (m1.device_id = m2.device_id) | ||
| Join Filter: (m2.device_id = m1.device_id) |
Member
Author
There was a problem hiding this comment.
Caused by different equivalence member creation order, basically the reverse of changes in #9714.
|
@melihmutlu, @natalya-aksman: please review this pull request.
|
svenklemm
approved these changes
Jun 22, 2026
dbeck
approved these changes
Jun 22, 2026
natalya-aksman
approved these changes
Jun 22, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This looks like a leftover of the old approach where we expanded all hypertables at the beginning of the query. The current code expands all hypertables when the "set pathlist" hook is called for the first hypertable. This doesn't seem to lead to any problems, but this control flow looks unexpected. Just let the Postgres enumerate all tables in query normally, and in the hook, expand only the hypertable it is called for.
Needed to simplify the code in #9315