From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tender Wang <tndrwang(at)gmail(dot)com> |
Cc: | Richard Guo <guofenglinux(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #19000: gist index returns inconsistent result with gist_inet_ops |
Date: | 2025-08-01 04:53:23 |
Message-ID: | 2197759.1754024003@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tender Wang <tndrwang(at)gmail(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 于2025年8月1日周五 11:33写道:
>> Richard Guo <guofenglinux(at)gmail(dot)com> writes:
>>> On Fri, Aug 1, 2025 at 3:17 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> We've known about this for, um, decades: btree_gist's support for
>>>> inet/cidr is fundamentally broken [1][2].
> What I debugged yesterday was, in gbt_inet_consistent(),
> query = convert_network_to_scalar(dquery, INETOID, &failure);
Right --- as I mentioned in one of the linked threads, the thing that
is fundamentally wrong here is relying on convert_network_to_scalar
in the first place. That has no charter to deliver exact results,
and it doesn't. In the present example I think the issue is that
it doesn't consider the netmask at all; but there are many other
cases where it's not an exact representation of inet's sort order.
That's not a big problem for its intended purpose for statistical
estimates, but it's completely fatal for index infrastructure.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2025-08-01 10:00:17 | Re: Use-after-free in reorderbuffer.c for INSERT ON CONFLICT |
Previous Message | Michael Paquier | 2025-08-01 04:52:20 | Re: Use-after-free in reorderbuffer.c for INSERT ON CONFLICT |