Nathan Wagner <nw...@hydaspes.if.org> writes:
> On Fri, Nov 06, 2015 at 11:45:38AM -0500, Tom Lane wrote:
>> (There's a fair amount of dead code in /geqo/, which I've never had
>> the energy to clean up, but maybe we should do that sometime. It
>> seems unlikely that anyone will ever be interested in experimenting
>> with the ifdef'ed-out code paths.)
> I also note that in src/backend/optimizer/path/allpaths.c there is a
> join_search_hook variable apparently intended for plugins (extensions?)
> to be able to control the search path optimizer. And the geqo code is
> AFAICT turned off by default anyway, so none of the code is used in
> probably the vast majority of systems, with standard_join_search() being
> called instead.
Uh, what? It's not by any means turned off by default.
postgres=# select name,setting from pg_settings where name like '%geqo%';
name | setting
geqo | on
geqo_effort | 5
geqo_generations | 0
geqo_pool_size | 0
geqo_seed | 0
geqo_selection_bias | 2
geqo_threshold | 12
You do need at least 12 tables in the FROM list to get it to be exercised
with the default settings, which among other things means that our
regression tests don't stress it much at all. But it's definitely
> Would it be worth either of removing at least the non-ERX portions of
> the geqo code, or removing the geqo code entirely (presumably with a
> deprecation cycle) and moving it to an extension?
Removing it is right out, as you'll soon find if you try to plan a query
with a couple dozen tables with geqo turned off. The standard exhaustive
search just gets too slow.
I'm inclined to think that removing all the ifdefd-out-by-default logic
would be a fine thing to do, though.
regards, tom lane
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: