Re: Is there a way to temporarily disable a index

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Is there a way to temporarily disable a index
Дата
Msg-id 20140711151050.GA11292@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Is there a way to temporarily disable a index  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Is there a way to temporarily disable a index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2014-07-11 11:07:21 -0400, Tom Lane wrote:
> 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 ;-)

Works, but IIRC can cause problems at least < 9.4 because concurrent
cache builds might miss the pg_index row...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Is there a way to temporarily disable a index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is there a way to temporarily disable a index