Re: Concurrently option for reindexdb

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Concurrently option for reindexdb
Дата
Msg-id 5404780C.1000305@2ndquadrant.com
обсуждение исходный текст
Ответ на Concurrently option for reindexdb  (Sawada Masahiko <sawada.mshk@gmail.com>)
Ответы Re: Concurrently option for reindexdb  (Sawada Masahiko <sawada.mshk@gmail.com>)
Список pgsql-hackers
On 08/25/2014 02:36 PM, Sawada Masahiko wrote:
> Hi all,
> 
> Attached WIP patch adds "-C (--concurrently)" option for reindexdb
> command for concurrently reindexing.
> If we specify "-C" option with any table then reindexdb do reindexing
> concurrently with minimum lock necessary.
> Note that we cannot use '-s' option (for system catalog) and '-C'
> option at the same time.
> This patch use simple method as follows.
> 
> 1. Do "CREATE INDEX CONCURRENTLY" new index which has same definition
> as target index
> 2. Aquire ACCESS EXCLUSIVE LOCK to target table( and transaction starts)
> 3. Swap old and new index
> 4. Drop old index
> 5. COMMIT

How do you handle indexes tied to constraints - PRIMARY KEY, UNIQUE, or
EXCLUSION constraint indexes?

My understanding was that this currently required some less than lovely
catalog hacks.

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



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: psql \watch versus \timing
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: PL/pgSQL 2