On Apr 19, 2014 1:53 PM, "Torsten Förtsch" <torsten.foertsch@xxxxxxx> 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?
It works on a quick test, but I'm not sure how safe it is.
If you need to test a query without the index use a transaction:
Begin;
Drop index ...;
Explain ... select ...;
Rollback;
>
> Thanks,
> Torsten
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general