Re: Proposal: Pluggable Optimizer Interface - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: Pluggable Optimizer Interface
Date
Msg-id 22245.1187040203@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: Pluggable Optimizer Interface  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Responses Re: [PERFORM] Proposal: Pluggable Optimizer Interface  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> Julius Stroffek wrote:
>> There is a proposal attached to this mail about the interface
>> we would like to implement for switching between different
>> optimizers. Please review it and provide a feedback to us.

> hmm - how does is that proposal different from what got implemented with:
> http://archives.postgresql.org/pgsql-committers/2007-05/msg00315.php

Well, it's a very different level of abstraction.  The planner_hook
would allow you to replace the *entire* planner, but if you only want to
replace GEQO (that is, only substitute some other heuristics for partial
search of a large join-order space), doing it from planner_hook will
probably require duplicating a great deal of code.  A hook right at the
place where we currently choose "geqo or regular" would be a lot easier
to experiment with.

Replacing GEQO sounds like a fine area for investigation to me; I've
always been dubious about whether it's doing a good job.  But I'd prefer
a simple hook function pointer designed in the same style as
planner_hook (ie, intended to be overridden by a loadable module).
The proposed addition of a system catalog and SQL-level management
commands sounds like a great way to waste a lot of effort on mere
decoration, before ever getting to the point of being able to
demonstrate that there's any value in it.  Also, while we might accept
a small hook-function patch for 8.3, there's zero chance of any of that
other stuff making it into this release cycle.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Testing the async-commit patch
Next
From: Julius Stroffek
Date:
Subject: Re: Proposal: Pluggable Optimizer Interface