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

PG17 regress sanity: fix multi-1 diffs caused by PG17 optimizer enhancements #7769

Open
wants to merge 1 commit into
base: naisila/pg17_support
Choose a base branch
from

Conversation

colm-mchugh
Copy link
Contributor

@colm-mchugh colm-mchugh commented Nov 25, 2024

This commit restores the expected DEBUG error messages from the router planner in multi_router_planner, multi_router_planner_fast_path and query_single_shard_table. In the case of query_single_shard_table the diffs are because of PG17's ability to pull up a correlated ANY subquery to a join (*) . The fix is to inhibit pull up with a volatile function.

In the case of multi_router_planner and multi_router_planner_fast_path the diffs are because of PG17's ability to remove redundant IS (NOT) NULL expressions (**). The fix is to adjust the table definition so the column used for distribution is not marked NOT NULL.

(*) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9f1337639
(**) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b262ad440

multi_router_planner_fast_path and query_single_shard_table

Restore the expected DEBUG error messages from the router planner.
In the case of query_single_shard_table the diffs are because of
PG17's ability to pull up correlated ANY subqueries (*). The fix
is to inhibit pull up with a volatile function.

In the case of multi_router_planner and multi_router_planner_fast_path
the diffs are because of PG17's ability to remove redundant IS (NOT)
NULL expressions (**). The fix is to adjust the table definition so
the column used for distribution is not marked NOT NULL.

(*) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9f1337639
(**) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=b262ad440
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.61%. Comparing base (c396ce6) to head (41b873f).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           naisila/pg17_support    #7769      +/-   ##
========================================================
- Coverage                 89.62%   89.61%   -0.01%     
========================================================
  Files                       274      274              
  Lines                     59689    59689              
  Branches                   7446     7446              
========================================================
- Hits                      53495    53492       -3     
- Misses                     4065     4067       +2     
- Partials                   2129     2130       +1     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant