Re: Disable an index temporarily - Mailing list pgsql-general

From Rajeev rastogi
Subject Re: Disable an index temporarily
Date
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7713DDE2967@SZXEML508-MBX.china.huawei.com
Whole thread Raw
In response to Disable an index temporarily  (Torsten Förtsch <torsten.foertsch@gmx.net>)
List pgsql-general
On 20 April 2014 02:21, Torsten Wrote:

> Hi,
>
> an index can be INVALID (pg_index.indisvalid=false).
>
> I want to temporarily disable an index so that it won't be used to
> access data but will still be updated.
>
> Can I simply set pg_index.indisvalid=false and later turn it true again?

I don't think there is any way to do so.

But If your intension is just to avoid index scan for some time, then you can use following command, which disable
indexscan 
        set enable_indexscan to off;
Once you are done with experimentation, you can execute command, which enable index scan.
        set enable_indexscan to on;

Thanks and Regards,
Kumar Rajeev Rastogi


pgsql-general by date:

Previous
From: Fenn Bailey
Date:
Subject: Re: Non-deterministic 100% CPU hang on postgres 9.3
Next
From: Rajeev rastogi
Date:
Subject: Re: any way for a transaction to "see" inserts done earlier in the transaction?