Re: Is there a way to temporarily disable a index - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is there a way to temporarily disable a index
Date
Msg-id 3154.1405091241@sss.pgh.pa.us
Whole thread Raw
In response to Re: Is there a way to temporarily disable a index  (David G Johnston <david.g.johnston@gmail.com>)
Responses Re: Is there a way to temporarily disable a index
Re: Is there a way to temporarily disable a index
List pgsql-hackers
David G Johnston <david.g.johnston@gmail.com> writes:
> Benedikt Grundmann wrote
>> That is it possible to tell the planner that index is off limits i.e.
>> don't ever generate a plan using it?

> Catalog hacking could work but not recommended (nor do I know the proper
> commands and limitations).  Do you need the database/table to accept writes
> during the testing period?

Hacking pg_index.indisvalid could work, given a reasonably recent PG.
I would not try it in production until I'd tested it ;-)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allowing NOT IN to use ANTI joins
Next
From: Andres Freund
Date:
Subject: Re: Is there a way to temporarily disable a index