Re: Wrong Results from SP-GiST with Collations - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: Wrong Results from SP-GiST with Collations
Date
Msg-id CAH2-WznG1-gnBcHuSDNd=u+1oYiJHkN75P-m9cNkN7aP9j4v5Q@mail.gmail.com
Whole thread Raw
In response to Re: Wrong Results from SP-GiST with Collations  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wrong Results from SP-GiST with Collations
List pgsql-bugs
On Mon, Apr 16, 2018 at 12:28 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Right. Alternatively, you could actually call varstr_cmp() within the
>> "non-collation-aware" branch.
>
> True.  This way saves a few cycles, but maybe it's not worth the extra
> code.  I think the only case where you could really notice the difference
> is for an equality search operator, which might end up doing a lot more
> work in non-C collations (full-blown strcoll vs memcmp).

I don't have a full understanding of this particular problem, but it
sounds to me that that would be a non-issue due to the equality
fast-path added to varstr_cmp() several years ago. I microbenchmarked
it quite extensively at the time, and concluded that it was all but
free in cases where it didn't work out.

-- 
Peter Geoghegan


pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Standby corruption after master is restarted
Next
From: Tom Lane
Date:
Subject: Re: Wrong Results from SP-GiST with Collations