From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Cc: | Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Crash in BRIN minmax-multi indexes |
Date: | 2021-04-01 01:22:03 |
Message-ID: | CALNJ-vT1yG-hdMbkmcXt7O7Zc8QuunP32HqaLWpUKUyOOJB7-w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
- delta += (float8) addrb[i] - (float8) addra[i];
- delta /= 256;
...
+ delta /= 255;
May I know why the divisor was changed ?
Thanks
On Wed, Mar 31, 2021 at 3:25 PM Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
wrote:
> Hi,
>
> I think I found the issue - it's kinda obvious, really. We need to
> consider the timezone, because the "time" parts alone may be sorted
> differently. The attached patch should fix this, and it also fixes a
> similar issue in the inet data type.
>
> As for why the regression tests did not catch this, it's most likely
> because the data is likely generated in "nice" ordering, or something
> like that. I'll see if I can tweak the ordering to trigger these issues
> reliably, and I'll do a bit more randomized testing.
>
> There's also the question of rounding errors, which I think might cause
> random assert failures (but in practice it's harmless, in the worst case
> we'll merge the ranges a bit differently).
>
>
> regards
>
> --
> Tomas Vondra
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-04-01 01:39:30 | Re: Crash in BRIN minmax-multi indexes |
Previous Message | Michael Paquier | 2021-04-01 01:21:32 | Re: Proposal: Save user's original authenticated identity for logging |