Darren King wrote:
>
> > Ok, it seems to be coming from
> >
> > if(!path->p_ordering.ord.sortop) {
> > break;
> > }
> > in geqo_paths.c:geqo_rel_paths() & prune.c:prune_rel_paths()
> >
> > So as you can reproduce it, could you check with GEQO ON that
> > if (!path->p_ordering.ord.sortop) then compute_joinrel_size()
> > returns <= 0. If it's true then we can add check to geqo_eval.c
> > and allpaths.c:
> >
>
> I added a debug statement at the end of geqo_rel_paths() to print
> the rel->size and they were all positive, ranging in value from
> 73 to 2147483647 (MAX_INT).
^^^^^^^^^^
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).
CVS changed.
Vadim
------------------------------