Re: Optimizer hook - Mailing list pgsql-patches

From Tom Lane
Subject Re: Optimizer hook
Date
Msg-id 8756.1190580490@sss.pgh.pa.us
Whole thread Raw
In response to Re: Optimizer hook  (Julius Stroffek <Julius.Stroffek@Sun.COM>)
Responses Re: Optimizer hook
List pgsql-patches
Julius Stroffek <Julius.Stroffek@Sun.COM> writes:
> I rewrote a patch a bit.

This hook seems very strangely defined to me.  Why did you not put the
hook at the point where the current geqo-vs-regular decision is made?
I do not see the value of duplicating the joinlist-expansion logic,
which is what you're going to have to do if you use a hook that replaces
make_rel_from_joinlist.  The only things you could do differently than
it does would be (1) be smarter about full outer joins, which was not
part of the agenda that I heard of, or (2) willfully disregard the
user's from_collapse_limit and join_collapse_limit settings, which
doesn't seem like an amazingly good idea either.

Also, "optimizer_hook" seems nearly content-free as a name for use
in this area; I see no reason why the particular sub-section of the
planner we're discussing here has more title to that name than other
parts.  Something like "join_order_search_hook" might be more
appropriate.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Use latestCompletedXid to slightly optimize TransactionIdIsInProgress
Next
From: Tom Lane
Date:
Subject: Re: XML binary I/O (was Re: tsearch refactorings)