Concurrently option for reindexdb

Поиск
Список
Период
Сортировка
От Sawada Masahiko
Тема Concurrently option for reindexdb
Дата
Msg-id CAD21AoCYBuR5EawbU8ifgZ6Hrt-+L9U=NzOx5icoRhQj6=BFeg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Concurrently option for reindexdb  (Michael Paquier <michael.paquier@gmail.com>)
Re: Concurrently option for reindexdb  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
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

These process are based on pg_repack(or pg_reorg) does, done via SQL.

ToDo
- Multi language support for log message.

Regards,

-------
Sawada Masahiko

Вложения

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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: WIP Patch for GROUPING SETS phase 1
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Concurrently option for reindexdb