ADBDEV-2885: Postgres planner produces bogus plan for query to replicated table with SIRV function#365
ADBDEV-2885: Postgres planner produces bogus plan for query to replicated table with SIRV function#365RekGRpth wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Please describe the meaning of both code lines in the commit and PR description.
There was a problem hiding this comment.
for query (on distributed replicated tables) containing volatile functions consider adjust plan flow
There was a problem hiding this comment.
Please provide test description.
It's not recommended to limit test execution by some planner (except cases when it leads to creation new copy of out file, or reproduction steps uses fault injector and freezes on the different optimizer).
There was a problem hiding this comment.
You may use costs off to decrease patch footprint in this case. More, I think that explain analyze is enough (valid plan + SIGSEGV absence).
|
The next queries are planned incorrect with current version of patch (SIGSEGV without patch): In my opinion, you are trying to solve exact problem, but the problem is wider. |
756a562 to
b86e435
Compare
…ated table with SIRV function
ADB 6.21.1_arenadata36 release
Query with subplan containing volatile functions on distributed replicated tables does not make motion gather. This produces wrong plan and leads to segfault.
Steps to reproduce this problem:
Wrong plans:
Solving problem includes make explicit motion gather for such subplan and only for it.
Right plans: