Re: Invisible Indexes

From: Robert Treat <rob(at)xzilla(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Invisible Indexes
Date: 2018-06-18 22:35:15
Message-ID: CABV9wwNLsxsBNW71Vbf3saYq4tq-Nvps1ZC8B215hwUd_oOCWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 18, 2018 at 6:11 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2018-06-18 18:05:11 -0400, Tom Lane wrote:
>> Andres Freund <andres(at)anarazel(dot)de> writes:
>> > On 2018-06-18 17:57:04 -0400, Tom Lane wrote:
>> >> I think the actually desirable way to handle this sort of thing is through
>> >> an "index advisor" sort of plugin, which can hide a given index from the
>> >> planner without any globally visible side-effects.
>>
>> > Although I'm a bit doubtful that just shoving this into an extension is
>> > really sufficient. This is an extremely common task.
>>
>> 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.
>
>
>> It's possible that they've all bit-rotted for lack of support, which
>> would not speak highly of the demand for the feature.
>
> IDK, the DBA / developer crowd hitting issues like this isn't the same
> as the crowd willing to update an external plugin that doesn't even do
> quite what you want, and was more experimental than anything.
>

Indeed. ISTR a conversation I had with someone on slack earlier this
year about the validity of just manually updating indisvalid as a
means for determining if an index could be safely removed (for the
record, I did not recommend it ;-)

DBA's are often willing to weedwhacker at things in SQL when the
alternative is to learn C.

Robert Treat
http://xzilla.net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-06-18 23:05:01 Re: [WIP] [B-Tree] Retail IndexTuple deletion
Previous Message David G. Johnston 2018-06-18 22:27:15 Re: Invisible Indexes