PG17 regress sanity: fix multi-1 diffs caused by PG17 optimizer enhancements #7769
+12
−12
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 commit restores the expected DEBUG error messages from the router planner in
multi_router_planner
,multi_router_planner_fast_path
andquery_single_shard_table
. In the case ofquery_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
andmulti_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