Re: Is there a way to temporarily disable a index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there a way to temporarily disable a index
Date: 2014-07-11 15:07:21
Message-ID: 3154.1405091241@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-07-11 15:10:50 Re: Is there a way to temporarily disable a index
Previous Message Tom Lane 2014-07-11 15:04:06 Re: Allowing NOT IN to use ANTI joins