Re: B-Tree support function number 3 (strxfrm() optimization) - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: B-Tree support function number 3 (strxfrm() optimization)
Date
Msg-id CAM3SWZQ+ui133Er-hhnA6MWcFRkFYCkg_NCCdt_YVNV==U6+KA@mail.gmail.com
Whole thread Raw
In response to Re: B-Tree support function number 3 (strxfrm() optimization)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Nov 25, 2014 at 4:01 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> There's a lot of stuff in this patch I'm still trying to digest

I spotted a bug in the most recent revision. Mea culpa.

I think that the new field Tuplesortstate.abbrevNext should be an
int64, not an int. The fact that Tuplesortstate.memtupcount is an int
is not reason enough to make abbrevNext an int -- after all, with the
patch applied tuplesort uses a doubling growth strategy in respect of
abbrevNext, whereas grow_memtuples() is very careful about integer
overflow when growing memtupcount. I suggest we follow the good
example of tuplesort_skiptuples() in making our "ntuples" variable
(Tuplesortstate.abbrevNext) an int64 instead. The alternative is to
add grow_memtuples()-style checks.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Ian Barwick
Date:
Subject: Typo/spacing fix for "29.1. Reliability"
Next
From: Alvaro Herrera
Date:
Subject: Re: Buildfarm not happy with test module move