Nathan Bossart <nathandbossart@gmail.com> writes:
> Upon closer inspection, I found a rather nasty problem. The qsort
> comparator expects a TocEntry **, but the binaryheap comparator expects a
> TocEntry *, and we simply pass the arguments through to the qsort
> comparator. In v9, I added the requisite ampersands.
Ooops :-(
> I'm surprised this
> worked at all.
Probably it was not sorting things appropriately. Might be worth adding
some test scaffolding to check that bigger tasks are chosen before
smaller ones.
regards, tom lane