Re: BUG #17774: Assert triggered on brin_minmax_multi.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17774: Assert triggered on brin_minmax_multi.c
Дата
Msg-id 3485884.1675868581@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17774: Assert triggered on brin_minmax_multi.c  (Dmitry Dolgov <9erthalion6@gmail.com>)
Ответы Re: BUG #17774: Assert triggered on brin_minmax_multi.c  (Dmitry Dolgov <9erthalion6@gmail.com>)
Список pgsql-bugs
Dmitry Dolgov <9erthalion6@gmail.com> writes:
> The negative delta might be only a consequence. From what I see it's
> called from build_distances, and the idea is to find the gaps between
> the max value of the current interval and the min value of the next one,
> so they should be ordered and delta should be always positive.

I'd believe this argument more readily if the calculation weren't being
done in float arithmetic.  Since it is, you're at the mercy of roundoff
error ... and that small negative delta could certainly pass for
roundoff error.

Clamping the result to [0,1] would be a brighter plan than just asserting
that it's in-range.

            regards, tom lane



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

Предыдущее
От: Dmitry Dolgov
Дата:
Сообщение: Re: BUG #17774: Assert triggered on brin_minmax_multi.c
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: BUG #17774: Assert triggered on brin_minmax_multi.c