Re: More work on SortSupport for text - strcoll() and strxfrm() caching

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Date: 2015-10-12 19:31:34
Message-ID: CAM3SWZQLAsCtXXRrB+HUn9sv2kCeDn4OHwXGaNXuP30iVt_jAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 12, 2015 at 12:47 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> I also noticed that I failed to reset the last_returned strcoll()
> cache variable as part of an abbreviation call, despite the fact that
> tapesort may freely interleave conversions with comparisons, while
> reusing buf1 and buf2 both as scratch space for strxfrm() blobs, as
> well as for storing strings to be compared with strcoll(). I suggest
> that the attached patch also be applied to fix this issue.

I think that I jumped the gun with this fix, because theoretically you
can still get the same problem in the opposite direction -- an
original string treated as a strxfrm() blob when the cache is
consulted.

I'll consider a more comprehensive fix.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Keller 2015-10-12 20:28:39 Re: point_ops for GiST
Previous Message Robert Haas 2015-10-12 17:04:31 a raft of parallelism-related bug fixes