> Thanks for help, Darren! I hope that cause found now:
> compute_joinrel_size() shouldn't be called for non-JoinPath path!
> In old opt-r we have:
>
> if (IsA_JoinPath(cheapest))
> {
> rel->size = compute_joinrel_size(cheapest);
> }
> else
> elog(WARN, "non JoinPath called");
>
> - so I changed geqo_rel_paths():
>
> cheapest = (JoinPath*)set_paths(rel, path);
> if ( IsA_JoinPath (cheapest) )
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> rel->size = compute_joinrel_size(cheapest);
>
> else - does nothing!
>
> In this case compute_rel_size() in gimme_tree() will be called
> (I added if ( new_rel->size <= 0 ) there yesterday).
Fixes geqo for my test data. Will test some more cases when I get
time, but this appears to have nailed the optimizer problem.
Darren darrenk@insightdist.com
------------------------------