From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Greg Stark <stark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: B-Tree support function number 3 (strxfrm() optimization) |
Date: | 2014-12-01 00:35:45 |
Message-ID: | CAM3SWZQ+ui133Er-hhnA6MWcFRkFYCkg_NCCdt_YVNV==U6+KA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 25, 2014 at 4:01 AM, Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-12-01 01:03:36 | Re: Buildfarm not happy with test module move |
Previous Message | Ian Barwick | 2014-12-01 00:31:12 | Typo/spacing fix for "29.1. Reliability" |