Peter Geoghegan <p...@heroku.com> writes: > On Fri, Aug 12, 2016 at 4:30 PM, Peter Geoghegan <p...@heroku.com> wrote: >> Doesn't tuplesort_heap_siftup() actually shift-down?
The reason it's called siftup is that that's what Knuth calls it. See Algorithm 5.2.3H (Heapsort), pp 146-147 in the first edition of Volume 3; tuplesort_heap_siftup corresponds directly to steps H3-H8. > Heikki (CC'd) and I discussed this privately today, and we were in > agreement that this needs to be fixed, so I wrote a patch, which I > attach here. I think this patch is misguided, as it unnecessarily moves the code away from standard nomenclature. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers