Re: Support for REINDEX CONCURRENTLY

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Support for REINDEX CONCURRENTLY
Дата
Msg-id 20121005210703.GB5769@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Support for REINDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Support for REINDEX CONCURRENTLY
Список pgsql-hackers
Tom Lane escribió:

> Note that allowing subsequent requests to jump the queue would not be a
> good fix for this; if you do that, it's likely the ex-lock will never be
> granted, at least not till the next system idle time.  Which if you've
> got one, you don't need a feature like this at all; you might as well
> just reindex normally during your idle time.

Not really.  The time to run a complete reindex might be several hours.
If the idle time is just a few minutes or seconds long, it may be more
than enough to complete the switch operation, but not to run the
complete reindex.

Maybe another idea is that the reindexing is staged: the user would
first run a command to create the replacement index, and leave both
present until the user runs a second command (which acquires a strong
lock) that executes the switch.  Somehow similar to a constraint created
as NOT VALID (which runs without a strong lock) which can be later
validated separately.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Support for REINDEX CONCURRENTLY