Re: pgstatindex vs. !indisready

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgstatindex vs. !indisready
Дата
Msg-id ZTXQxnZ1n1psnyXT@paquier.xyz
обсуждение исходный текст
Ответ на Re: pgstatindex vs. !indisready  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On Sun, Oct 22, 2023 at 02:02:45PM -0700, Noah Misch wrote:
> -    /* OK, do it */
> -    brinsummarize(indexRel, heapRel, heapBlk, true, &numSummarized, NULL);
> +    /* see gin_clean_pending_list() */
> +    if (indexRel->rd_index->indisvalid)
> +        brinsummarize(indexRel, heapRel, heapBlk, true, &numSummarized, NULL);
> +    else
> +        ereport(DEBUG1,
> +                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> +                 errmsg("index \"%s\" is not valid",
> +                        RelationGetRelationName(indexRel))));

brinsummarize() could return 0 even for a valid index, and we would
not be able to make the difference with an invalid index.  Perhaps you
are right and this is not a big deal in practice to do as you are
suggesting.
--
Michael

Вложения

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

Предыдущее
От: sirisha chamarthi
Дата:
Сообщение: Re: Why is hot_standby_feedback off by default?
Следующее
От: sirisha chamarthi
Дата:
Сообщение: Re: Why is hot_standby_feedback off by default?