Re: Rewritten Index Advisor patch
От | Tom Lane |
---|---|
Тема | Re: Rewritten Index Advisor patch |
Дата | |
Msg-id | 19929.1180116992@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Rewritten Index Advisor patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-patches |
I wrote: > Attached is a proposed replacement patch that keeps essentially all the > advisor logic outside the core backend, and uses the method I suggested of > modifying the result of get_relation_info() rather than installing phony > system-catalog entries. I've applied this with one further change to make the planner_hook a bit more general; it now looks like this: PlannedStmt * planner(Query *parse, int cursorOptions, ParamListInfo boundParams) { PlannedStmt *result; if (planner_hook) result = (*planner_hook) (parse, cursorOptions, boundParams); else result = standard_planner(parse, cursorOptions, boundParams); return result; } PlannedStmt * standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) { ... exactly the same as planner() was before ... } This avoids presuming that the hook needs to duplicate the Query, and potentially lets a plugin replace the planner altogether. The Index Advisor patch as-submitted is not compatible with these hooks, but it appears to need nontrivial work anyway due to other changes between 8.2 and 8.3 (in particular the introduction of PlannedStmt). Rather than trying to get it into 8.3 as a contrib module, I recommend pursuing it as a pgfoundry project, so as to decouple its release schedule from the backend's. regards, tom lane
В списке pgsql-patches по дате отправления: