Re: Disabling an index temporarily

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: jd(at)commandprompt(dot)com
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Disabling an index temporarily
Date: 2015-12-12 03:14:48
Message-ID: 20151212.121448.135660261275188653.t-ishii@sraoss.co.jp
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?

But this will affect other sessions, no?

> 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?

Yes.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2015-12-12 04:43:12 Re: Bootstrap DATA is a pita
Previous Message Joshua D. Drake 2015-12-12 03:03:48 Re: Disabling an index temporarily