Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Updated patch against cvs update in case it makes applying easier.
Applied with revisions --- notably, I avoided adding any overhead to
HEAPCOMPARE() by the expedient of reversing the logical sort order
before heapify'ing. We couldn't have done that before the NULLS_FIRST
patch went in, but now it's trivial to make the sort order reverse
fully.
Since you didn't include any documentation patch for the
optimize_bounded_sort GUC variable, I assumed it was meant only for
debugging and hid it behind #ifdef DEBUG_BOUNDED_SORT.
regards, tom lane