Re: BRIN minmax multi - incorrect distance for infinite timestamp/date

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: BRIN minmax multi - incorrect distance for infinite timestamp/date
Дата
Msg-id CAEZATCUNjgmTfTJnkR+DMXfRbrm+bqJuEZ-fKRJF3X4mr=o3LQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BRIN minmax multi - incorrect distance for infinite timestamp/date  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: BRIN minmax multi - incorrect distance for infinite timestamp/date  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
On Fri, 13 Oct 2023 at 11:44, Tomas Vondra
<tomas.vondra@enterprisedb.com> wrote:
>
> On 10/13/23 11:21, Dean Rasheed wrote:
> >
> > Is this only inefficient? Or can it also lead to wrong query results?
>
> I don't think it can produce incorrect results. It only affects which
> values we "merge" into an interval when building the summaries.
>

Ah, I get it now. These "distance" support functions are only used to
see how far apart 2 ranges are, for the purposes of the algorithm that
merges the 2 closest ranges. So if it gets it wrong, it only leads to
a poor choice of ranges to merge, making the query inefficient, but
still correct.

Presumably, that also makes this kind of change safe to back-patch
(not sure if you were planning to do that?), since it will only affect
range merging choices when inserting new values into existing indexes.

Regards,
Dean



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

Предыдущее
От: Erki Eessaar
Дата:
Сообщение: Re: PostgreSQL domains and NOT NULL constraint
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: BRIN minmax multi - incorrect distance for infinite timestamp/date