Re: BUG #19700: PostgreSQL: an SP-GiST index on `inet` makes IPv6 rows invisible - Mailing list pgsql-bugs

From Andrey Borodin
Subject Re: BUG #19700: PostgreSQL: an SP-GiST index on `inet` makes IPv6 rows invisible
Date
Msg-id 3225FD6C-2EFB-4738-83D6-5DA864D60E48@yandex-team.ru
Whole thread
In response to Re: BUG #19700: PostgreSQL: an SP-GiST index on `inet` makes IPv6 rows invisible  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: BUG #19700: PostgreSQL: an SP-GiST index on `inet` makes IPv6 rows invisible
List pgsql-bugs
On 21 Sep 2026, Kirill Reshke wrote:
> So, I updated inet_spg_choose to support the 'allTheSame' case.

The code changes look correct.  Could the new comment explain that
checkAllTheSame() can exclude the incoming tuple?  Here picksplit did
separate the families, but the remaining old tuples all went to one
node.  The file header also needs an exception to its claim that a
prefixless tuple has exactly two family-specific nodes.

Could we add regression coverage for both the original missing-rows case
and this insertion case, checking searches for both families afterwards?
The latter is a separate bug and should fail even with just the
picksplit fix applied.  It would be useful to cover IPv4 arriving after
IPv6 duplicates too.

In inner_consistent, checking allTheSame first would let both cases use
the existing visit-all-nodes branch.

I'd also suggest to add the reporter's REINDEX warning into the commit
message.  And few words of what is going on would be helpful too.

Thank you!


Best regards, Andrey Borodin.




pgsql-bugs by date:

Previous
From: Ayush Tiwari
Date:
Subject: Re: BUG #19710: Incorrect DELETE result after LEFT JOIN optimization
Next
From: Andrey Borodin
Date:
Subject: Re: BUG #19698: IMPORT FOREIGN SCHEMA treats a NOT VALID NOT NULL constraint as validated