-
Notifications
You must be signed in to change notification settings - Fork 671
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
PG17 compatibility: Fix Test Failure in local_table_join #7732
base: naisila/pg17_support
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## naisila/pg17_support #7732 +/- ##
========================================================
+ Coverage 89.61% 89.63% +0.02%
========================================================
Files 274 274
Lines 59689 59672 -17
Branches 7446 7444 -2
========================================================
- Hits 53490 53488 -2
+ Misses 4069 4054 -15
Partials 2130 2130 |
@@ -1438,7 +1442,7 @@ set citus.local_table_join_policy to 'prefer-distributed'; | |||
SELECT COUNT(*) FROM distributed_table d1 JOIN postgres_table using(key) | |||
WHERE d1.key IN (SELECT key FROM distributed_table WHERE d1.key = key and key = 5); | |||
DEBUG: Wrapping relation "distributed_table" "d1" to a subquery | |||
DEBUG: generating subplan XXX_1 for subquery SELECT key FROM local_table_join.distributed_table d1 WHERE true | |||
DEBUG: generating subplan XXX_1 for subquery SELECT key FROM local_table_join.distributed_table d1 WHERE (key OPERATOR(pg_catalog.=) 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have just two lines with the same change (key OPERATOR(pg_catalog.=) 5)
How about a normalized line, we can change the table names such that the normalization rule detects the line easily.
e.g.
postgres_table_key5_filtering
distributed_table_key5_filtering
Just an idea, could be better. But I am reluctant of merging a new file with 1659 new lines just for 2 lines change in the test output. What do you think?
PostgreSQL 17 seems to have introduced improvements in how correlated subqueries are handled during plan generation. Instead of generating a trivial subplan with WHERE true, it now applies more specific filtering (WHERE (key = 5)), which makes the execution plan more efficient.
postgres/postgres@b262ad44