Re: Get more from indices.

Поиск
Список
Период
Сортировка
От Etsuro Fujita
Тема Re: Get more from indices.
Дата
Msg-id 5346672F.1060202@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Get more from indices.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Get more from indices.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
(2014/04/10 0:08), Tom Lane wrote:
> Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
>> Oops! I found a bug in this patch. The previous v8 patch missed
>> the case that build_index_pathkeys() could build a partial
>> pathkeys from the index tlist.
> 
> TBH I think that's barely the tip of the iceberg of cases where this
> patch will get the wrong answer.

> Also, I don't see it doing anything to check the ordering
> of multiple index columns

I think that the following code in index_pathkeys_are_extensible() would
check the ordering:

+    if (!pathkeys_contained_in(pathkeys, root->query_pathkeys))
+        return false;

> Also, what's with the success return
> before the loop:
> 
> +    if (list_length(pathkeys) == list_length(root->query_pathkeys))
> +        return true;
> 
> At this point you haven't proven *anything at all* about whether the
> index columns have something to do with the query_pathkeys.

I think that the two pathkeys would be proved to be equal, if the both
conditions are satisfied.

Thanks,

Best regards,
Etsuro Fujita



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: WAL replay bugs
Следующее
От: Rajeev rastogi
Дата:
Сообщение: