From: | Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | Tatsuo Ishii <ishii(at)postgresql(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Disabling an index temporarily |
Date: | 2015-12-12 19:31:59 |
Message-ID: | CAJGNTeNTNXN46i-JbXDu3EV+bh+F9TrQhKGZCG-x143bYBzk2g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11 December 2015 at 22:03, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> 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?
>
BTW, you can do that today with
UPDATE pg_index SET indisvalid = false
WHERE indexrelid = 'indexname'::regclass;
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
From | Date | Subject | |
---|---|---|---|
Next Message | Ants Aasma | 2015-12-12 19:42:05 | Re: Using quicksort for every external sort run |
Previous Message | Tomas Vondra | 2015-12-12 18:37:45 | PATCH: add pg_current_xlog_flush_location function |