Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows - Mailing list pgsql-bugs

From shihao zhong
Subject Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows
Date
Msg-id CAGRkXqSFL35o-wR2jgmXbeVaRKxADEsLNOcTQFShHCUddZB-bw@mail.gmail.com
Whole thread
In response to Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: BUG #19705: One NaN box makes a BRIN box_inclusion_ops index omit unrelated rows
List pgsql-bugs
Hi Andrey, 
> I found two false negatives with v2, on fresh indexes.

Thanks, I reproduced both. v3 attached. 0001 is Kirill's v2 unchanged,
0002 fixes your cases, with tests that fail without it.

1. BRIN now asks the mergeable function about the first value too, by
merging it with itself. No change for inet.

2. GiST internal pages no longer prune ~= when the query has a NaN.
There is nothing safe to compare it with.

0002 also stops gist_box_union() from copying a NaN first entry.

Thanks,
Shihao

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #19649: Qual pushdown into GROUP BY subqueries ignores non-equivalence-preserving references to grouping col
Next
From: Daniel Gustafsson
Date:
Subject: Re: BUG #19711: SSH tunnel with PPK identity file fails/crashes in newer pgAdmin version but works in older version