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

Attachment: v1-0001-Fix-incorrect-comments-in-tuplesort.c.patch
Description: Binary data

Reply via email to