Re: pg_index.indisreplident and invalid indexes

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: pg_index.indisreplident and invalid indexes
Дата
Msg-id 20200828081537.2j2ur6jtnmbpuvw5@localhost
обсуждение исходный текст
Ответ на pg_index.indisreplident and invalid indexes  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pg_index.indisreplident and invalid indexes  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
> On Thu, Aug 27, 2020 at 11:57:21AM +0900, Michael Paquier wrote:
>
> I think that this problem is similar to indisclustered, and that we
> had better set indisreplident to false when clearing indisvalid for an
> index concurrently dropped.  This would prevent problems with ALTER
> TABLE of course, but also the relcache.
>
> Any objections to the attached?  I am not sure that this is worth a
> backpatch as that's unlikely going to be a problem in the field, so
> I'd like to fix this issue only on HEAD.  This exists since 9.4 and
> the introduction of replica identities.

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?

    /*
     * Mark the new index as valid, and the old index as invalid similarly to
     * what index_set_state_flags() does.
     */
    newIndexForm->indisvalid = true;
    oldIndexForm->indisvalid = false;
    oldIndexForm->indisclustered = false;



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: recovering from "found xmin ... from before relfrozenxid ..."
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_index.indisreplident and invalid indexes