From: | Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com> |
---|---|
To: | Torsten Förtsch <torsten(dot)foertsch(at)gmx(dot)net> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Disable an index temporarily |
Date: | 2014-04-21 03:29:30 |
Message-ID: | BF2827DCCE55594C8D7A8F7FFD3AB7713DDE2967@SZXEML508-MBX.china.huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 index scan
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
From | Date | Subject | |
---|---|---|---|
Next Message | Rajeev rastogi | 2014-04-21 03:45:11 | Re: any way for a transaction to "see" inserts done earlier in the transaction? |
Previous Message | Fenn Bailey | 2014-04-21 03:19:44 | Re: Non-deterministic 100% CPU hang on postgres 9.3 |