Re: missing indexes in indexlist with partitioned tables

Поиск
Список
Период
Сортировка
От Arne Roland
Тема Re: missing indexes in indexlist with partitioned tables
Дата
Msg-id 937a0d27a72b4326a841f8a33a136ef5@index.de
обсуждение исходный текст
Ответ на Re: missing indexes in indexlist with partitioned tables  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: missing indexes in indexlist with partitioned tables  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
Hi!

> From: Zhihong Yu <zyu@yugabyte.com>
> Subject: Re: missing indexes in indexlist with partitioned tables
>  
> Hi,
>
> -           if (indexRelation->rd_rel->relkind == RELKIND_PARTITIONED_INDEX)
> +           if (inhparent && (!index->indisunique || indexRelation->rd_rel->relkind != RELKIND_PARTITIONED_INDEX))
>
> The check on RELKIND_PARTITIONED_INDEX seems to negate what the comment above says:
>
> +            * Don't add partitioned indexes to the indexlist
>
> Cheers

The comment at my end goes on:


/*  
* Don't add partitioned indexes to the indexlist, since they are
* not usable by the executor. If they are unique add them to the
* partindexlist instead, to use for further pruning. If they
* aren't that either, simply skip them.
*/


Regarding the structure: I think, that we probably should remove the first two sentences here. They reoccur 50 lines below anyways, which seems a dubious practice. The logic that enforces the first two sentences is mainly down below, so that place is probably on one to keep.

Regarding the semantics: This is sort of what the statement checks for (skip for inhparent, if not unique or not partitioned index), i.e. it checks for the case, where the index shouldn't be added to either list.

Side note: I personally think the name inhparent is mildly confusing, since it's not really about inheritance. I don't have a significantly better idea though.

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Sent: Wednesday, January 19, 2022 23:26
> Ah, apologies, I didn't realize that that test was so new.

No offense taken. Unless one was involved in the creation of the corresponding patch, it's unreasonable to know that. I like the second part of your message very much:

> See src/tools/ci/README (for multi-platform testing of patches on
> several platforms) and http://commitfest.cputube.org/

Thanks, I didn't know of cputube. Neat! That's pretty much what I was looking for!
Is there a way to get an email notification if some machine fails (turns bright red)? For the threads I'm explicitly subscribed to, that would seem helpful to me.

Regards
Arne

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [BUG]Update Toast data failure in logical replication
Следующее
От: Pavel Borisov
Дата:
Сообщение: Re: Add 64-bit XIDs into PostgreSQL 15