Re: Disabling an index temporarily

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Disabling an index temporarily
Date: 2015-12-12 03:03:48
Message-ID: 566B8E94.1080707@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/11/2015 06:25 PM, Tatsuo Ishii wrote:

> What about inventing a new SET command something like:
>
> SET disabled_index to <index-name>
>
> This adds <index-name> to "disabled index list". The disabled index
> list let the planner to disregard the indexes in the list.
>
> SET enabled_index to <index-name>
>
> This removes <index-name> from the disabled index list.
>
> SHOW disabled_index
>
> This shows the content of the disabled index list.

Wouldn't something like:

ALTER INDEX foo SET DISABLED;

See more in line with our grammar?

I assume the index is only disabled as far as the planner is concerned
and all updates/inserts/deletes will still actually update the index
appropriately?

JD

--
Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2015-12-12 03:14:48 Re: Disabling an index temporarily
Previous Message Tom Lane 2015-12-12 02:38:12 Re: More on the libxml2 update situation