Andres Freund <and...@anarazel.de> writes:
> On 2018-06-18 18:05:11 -0400, Tom Lane wrote:
>> Well, what I was thinking about was that this functionality already
>> exists (I think) in one or more "index advisor" plugins.

> They're doing the opposite, right? I.e. they return "hypothetical
> indexes", which then can be used by the planner. None of the ones I've
> seen currently mask out an existing index.

I had the idea that some of them could also hide existing indexes.
It's been awhile, so maybe my memory is faulty, but the hook we
provide is capable of that:

        /*
         * Allow a plugin to editorialize on the info we obtained from the
         * catalogs.  Actions might include altering the assumed relation size,
         * removing an index, or adding a hypothetical index to the indexlist.
         */
        if (get_relation_info_hook)
                (*get_relation_info_hook) (root, relationObjectId, inhparent, 
rel);

                        regards, tom lane

Reply via email to