Re: Disabling an index temporarily

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disabling an index temporarily
Дата
Msg-id 21347.1450063651@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Disabling an index temporarily  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: Disabling an index temporarily  (Michael Paquier <michael.paquier@gmail.com>)
Re: Disabling an index temporarily  (Jeff Janes <jeff.janes@gmail.com>)
Re: Disabling an index temporarily  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: Disabling an index temporarily  (Joel Jacobson <joel@trustly.com>)
Список pgsql-hackers
Corey Huinker <corey.huinker@gmail.com> writes:
> So, I'd propose we following syntax:
> ALTER INDEX foo SET DISABLED
> -- does the SET indisvalid = false shown earlier.

This is exactly *not* what Tatsuo-san was after, though; he was asking
for a session-local disable, which I would think would be by far the more
common use-case.  It's hard for me to see much of a reason to disable an
index globally while still paying all the cost to maintain it.  Seems to
me the typical work flow would be more like "disable index in a test
session, try all your queries and see how well they work, if you conclude
you don't need the index then drop it".  Or perhaps you could imagine that
you want the index selected for use only in certain specific sessions ...
but the above doesn't cater for that use-case either.

Certainly, there's opportunities to improve the flexibility of the
index-disable specifications in the plug-in Oleg and Teodor did.  But
I think that that is the right basic approach: some sort of SET command,
not anything that alters the catalogs.  We already have lots of
infrastructure that could handle desires like having specific values
active in only some sessions.
        regards, tom lane



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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Disabling an index temporarily
Следующее
От: Craig Ringer
Дата:
Сообщение: [PATCH] Logical decoding support for sequence advances