[Patch] Build the heap more efficient in tuplesort.c

cca5507 <cca5507@qq.com>

From: cca5507 <cca5507@qq.com>
To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-30T09:35:48Z
Lists: pgsql-hackers

Attachments

Hi hackers,

Now we build the heap by using tuplesort_heap_insert(), which has a sift-up every call.

To make it more efficient, I want to add tuplesort_heap_insert_unordered() and tuplesort_heap_build()
just like binaryheap_add_unordered() and binaryheap_build().

Thoughts?

--
Regards,
ChangAo Chen