Hi, I find that the initial size of memtuples array must be more than ALLOCSET_SEPARATE_THRESHOLD is not for lower overhead of allocation, but for a bug fixed in 8ea3e7a75c0d22c41c57f59c8b367059b97d0b66.
Attach a new patch. -- Regards, ChangAo Chen
v2-0001-Fix-incorrect-comments-in-tuplesort.c.patch
Description: Binary data
