Re: pg_index.indisreplident and invalid indexes

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_index.indisreplident and invalid indexes
Дата
Msg-id 20200828082136.GA1363@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_index.indisreplident and invalid indexes  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-hackers
On Fri, Aug 28, 2020 at 10:15:37AM +0200, Dmitry Dolgov wrote:
> Thanks for the patch. It sounds right, so no objections from me. But I
> wonder if something similar has to be done also for
> index_concurrently_swap function?

As of index.c, this already happens:
    /* Preserve indisreplident in the new index */
    newIndexForm->indisreplident = oldIndexForm->indisreplident;
    oldIndexForm->indisreplident = false;

In short, the new concurrent index is created first with
indisreplident = false, and when swapping the old and new indexes, the
new index inherits the setting of the old one, and the old one planned
for drop uses indisreplident = false when swapping.
--
Michael

Вложения

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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: pg_index.indisreplident and invalid indexes
Следующее
От: John Naylor
Дата:
Сообщение: Re: Deprecating postfix and factorial operators in PostgreSQL 13