From: | Tender Wang <tndrwang(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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:38:00 |
Message-ID: | CAHewXN=qY4XqMnqbHt0r-pTvS8mZ51mabExF30XQx8C9Kg0n4Q@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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]. It's still there
> >> only because nobody's been able to think of a way of removing it
> >> without causing pain for anyone who has indexes like that.
> >> But maybe we should just accept that it's going to cause pain
> >> and remove it.
>
> > I think correctness should take priority over avoiding pain.
>
> Yeah. I spent a little time investigating this today, and hope
> to have a patch to propose tomorrow.
>
What I debugged yesterday was, in gbt_inet_consistent(),
query = convert_network_to_scalar(dquery, INETOID, &failure);
(gdb) p query
$2 = 11822170368
then in gbt_num_consistent(), called tinfo->f_lt(query, key->upper,
flinfo), which is gbt_inetlt()
and
(gdb) p *(double *) b
$5 = 11822170368
a is equal to b, gbt_inet_consistent() returned false, no index tuple found.
--
Thanks,
Tender Wang
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2025-08-01 04:52:20 | Re: Use-after-free in reorderbuffer.c for INSERT ON CONFLICT |
Previous Message | Amit Kapila | 2025-08-01 04:33:14 | Re: Use-after-free in reorderbuffer.c for INSERT ON CONFLICT |