> On Dec 6, 2025, at 22:56, cca5507 <cca5507@qq.com> wrote:
>
> Hi,
>
> The incorrect comment:
>
> ```
> /*
> * Initial size of memtuples array. We're trying to select this size so that
> * array doesn't exceed ALLOCSET_SEPARATE_THRESHOLD and so that the overhead of
> * allocation might possibly be lowered. However, we don't consider array sizes
> * less than 1024.
> *
> */
> #define INITIAL_MEMTUPSIZE Max(1024, \
> ALLOCSET_SEPARATE_THRESHOLD / sizeof(SortTuple) + 1)
> ```
>
> The "doesn't exceed" are contrary to the macro. Maybe "slightly exceed"?
>
> Attach a small patch. (also remove the empty line in this comment)
>
> --
> Regards,
> ChangAo Chen
> <v1-0001-Fix-incorrect-comments-in-tuplesort.c.patch>
I guess a native English speaker may read the sentence in a different way than our non-English speakers. So, it’s
betterto wait for an English-speaking committer to decide if this comment needs to be updated.
But I agree from a non-English speaker’s view, this sentence is a little bit confusing, at least makes us to spend more
timeto understand its real meaning.
However, if we really want to update the comment, I just feel “slightly” is not be best choice here, because “slightly”
justmeans “not too much”, it doesn’t precisely describe the real meaning of the macro. I would suggest a rephrasing
like:"We choose the smallest number of SortTuple entries whose total size exceeds ALLOCSET_SEPARATE_THRESHOLD, and so
that…"
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/